diff options
| author | Maxim Sheronov | 2017-09-12 22:09:06 +0300 |
|---|---|---|
| committer | Maxim Sheronov | 2017-09-13 20:57:07 +0300 |
| commit | 0fffa45158bebeb4aaba1df1d271c000fffbe7f7 (patch) | |
| tree | 369918b0d7c9f367a7396c3584ac84ab550bd103 /core/bind | |
| parent | 69017974beb16dcfa971f9b6f33a4f005be57bef (diff) | |
| download | godot-0fffa45158bebeb4aaba1df1d271c000fffbe7f7.tar.gz godot-0fffa45158bebeb4aaba1df1d271c000fffbe7f7.tar.zst godot-0fffa45158bebeb4aaba1df1d271c000fffbe7f7.zip | |
Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
Diffstat (limited to 'core/bind')
| -rw-r--r-- | core/bind/core_bind.cpp | 12 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 0f217c823..d0acd0449 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -440,7 +440,7 @@ bool _OS::is_vsync_enabled() const { return OS::get_singleton()->is_vsync_enabled(); } -PowerState _OS::get_power_state() { +OS::PowerState _OS::get_power_state() { return OS::get_singleton()->get_power_state(); } @@ -1142,11 +1142,11 @@ void _OS::_bind_methods() { BIND_ENUM_CONSTANT(SYSTEM_DIR_PICTURES); BIND_ENUM_CONSTANT(SYSTEM_DIR_RINGTONES); - BIND_ENUM_CONSTANT(POWERSTATE_UNKNOWN); - BIND_ENUM_CONSTANT(POWERSTATE_ON_BATTERY); - BIND_ENUM_CONSTANT(POWERSTATE_NO_BATTERY); - BIND_ENUM_CONSTANT(POWERSTATE_CHARGING); - BIND_ENUM_CONSTANT(POWERSTATE_CHARGED); + BIND_ENUM_CONSTANT(OS::POWERSTATE_UNKNOWN); + BIND_ENUM_CONSTANT(OS::POWERSTATE_ON_BATTERY); + BIND_ENUM_CONSTANT(OS::POWERSTATE_NO_BATTERY); + BIND_ENUM_CONSTANT(OS::POWERSTATE_CHARGING); + BIND_ENUM_CONSTANT(OS::POWERSTATE_CHARGED); } _OS::_OS() { diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 1a3782c47..0578c2b80 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -36,7 +36,7 @@ #include "io/resource_saver.h" #include "os/dir_access.h" #include "os/file_access.h" -#include "os/power.h" +#include "os/os.h" #include "os/semaphore.h" #include "os/thread.h" @@ -303,7 +303,7 @@ public: void set_use_vsync(bool p_enable); bool is_vsync_enabled() const; - PowerState get_power_state(); + OS::PowerState get_power_state(); int get_power_seconds_left(); int get_power_percent_left(); |
