summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkarroffel <therzog@mail.de>2017-01-07 18:55:48 +0100
committerkarroffel <therzog@mail.de>2017-01-07 18:55:48 +0100
commitfbfcc981d95d94a3d7dfbc214e37bb02da3dec66 (patch)
tree8e5767cb752ba638576f874d40a0b0f1edf92ae8
parent2a38a5eaa844043b846e03d6655f84caf8a31e74 (diff)
exposed OS.set_exit_code and OS.get_exit_code to ClassDB
-rw-r--r--core/bind/core_bind.cpp13
-rw-r--r--core/bind/core_bind.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 0d89659cef..1ac8c76c7c 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -553,6 +553,16 @@ void _OS::set_icon(const Image& p_icon) {
OS::get_singleton()->set_icon(p_icon);
}
+int _OS::get_exit_code() const {
+
+ return OS::get_singleton()->get_exit_code();
+}
+
+void _OS::set_exit_code(int p_code) {
+
+ OS::get_singleton()->set_exit_code(p_code);
+}
+
/**
* Get current datetime with consideration for utc and
* dst
@@ -1112,6 +1122,9 @@ void _OS::_bind_methods() {
ClassDB::bind_method(_MD("set_icon","icon"),&_OS::set_icon);
+ ClassDB::bind_method(_MD("get_exit_code"),&_OS::get_exit_code);
+ ClassDB::bind_method(_MD("set_exit_code","code"),&_OS::set_exit_code);
+
ClassDB::bind_method(_MD("delay_usec","usec"),&_OS::delay_usec);
ClassDB::bind_method(_MD("delay_msec","msec"),&_OS::delay_msec);
ClassDB::bind_method(_MD("get_ticks_msec"),&_OS::get_ticks_msec);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 9a4f26a12d..a6ccf47652 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -246,6 +246,9 @@ public:
void set_use_file_access_save_and_swap(bool p_enable);
void set_icon(const Image& p_icon);
+
+ int get_exit_code() const;
+ void set_exit_code(int p_code);
Dictionary get_date(bool utc) const;
Dictionary get_time(bool utc) const;
Dictionary get_datetime(bool utc) const;