Fix enums bindings
Add missed bindings for enums Move some enums to class to have correct output of api.json
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user