diff options
| author | Rémi Verschelde | 2016-07-18 00:55:29 +0200 |
|---|---|---|
| committer | GitHub | 2016-07-18 00:55:29 +0200 |
| commit | c328693e837f5899b24504caef5a9ee5e4d4cb4e (patch) | |
| tree | facffec289b6e9d40dfe22bd53e4628e6076af05 /core/bind | |
| parent | be563a1663fa87510ddd59aced23b34560915dc2 (diff) | |
| parent | b2953bc1ccc23089559f1216563032fabd6b929f (diff) | |
| download | godot-c328693e837f5899b24504caef5a9ee5e4d4cb4e.tar.gz godot-c328693e837f5899b24504caef5a9ee5e4d4cb4e.tar.zst godot-c328693e837f5899b24504caef5a9ee5e4d4cb4e.zip | |
Merge pull request #5709 from akien-mga/pr-get-engine-version
OS: Add get_engine_version method
Diffstat (limited to 'core/bind')
| -rw-r--r-- | core/bind/core_bind.cpp | 7 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index d16db3883..9cc934bb6 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1002,6 +1002,11 @@ void _OS::alert(const String& p_alert,const String& p_title) { OS::get_singleton()->alert(p_alert,p_title); } +Dictionary _OS::get_engine_version() const { + + return OS::get_singleton()->get_engine_version(); +} + _OS *_OS::singleton=NULL; void _OS::_bind_methods() { @@ -1149,6 +1154,8 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_use_vsync","enable"),&_OS::set_use_vsync); ObjectTypeDB::bind_method(_MD("is_vsnc_enabled"),&_OS::is_vsnc_enabled); + ObjectTypeDB::bind_method(_MD("get_engine_version"),&_OS::get_engine_version); + BIND_CONSTANT( DAY_SUNDAY ); BIND_CONSTANT( DAY_MONDAY ); BIND_CONSTANT( DAY_TUESDAY ); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 5bd427578..b43c5246e 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -315,6 +315,8 @@ public: void set_use_vsync(bool p_enable); bool is_vsnc_enabled() const; + Dictionary get_engine_version() const; + static _OS *get_singleton() { return singleton; } _OS(); |
