diff options
| author | Juan Linietsky | 2015-08-04 18:09:51 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-08-04 18:09:51 -0300 |
| commit | 09a2de99169e9cf50d00febafad3a6705aa8d88a (patch) | |
| tree | 2866cb380e3bf0ced2720fcd42255288f05f2260 /core/bind/core_bind.cpp | |
| parent | d1da2c29955c851d74037a5196168a0a90507f9a (diff) | |
| download | godot-09a2de99169e9cf50d00febafad3a6705aa8d88a.tar.gz godot-09a2de99169e9cf50d00febafad3a6705aa8d88a.tar.zst godot-09a2de99169e9cf50d00febafad3a6705aa8d88a.zip | |
Diffstat (limited to 'core/bind/core_bind.cpp')
| -rw-r--r-- | core/bind/core_bind.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 95cafdb36..6a3023cdb 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -694,6 +694,17 @@ bool _OS::is_debug_build() const { } +void _OS::set_screen_orientation(ScreenOrientation p_orientation) { + + OS::get_singleton()->set_screen_orientation(OS::ScreenOrientation(p_orientation)); +} + +_OS::ScreenOrientation _OS::get_screen_orientation() const { + + return ScreenOrientation(OS::get_singleton()->get_screen_orientation()); +} + + String _OS::get_system_dir(SystemDir p_dir) const { return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir)); @@ -752,6 +763,9 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_window_maximized", "enabled"),&_OS::set_window_maximized); ObjectTypeDB::bind_method(_MD("is_window_maximized"),&_OS::is_window_maximized); + ObjectTypeDB::bind_method(_MD("set_screen_orientation","orientation"),&_OS::set_screen_orientation); + ObjectTypeDB::bind_method(_MD("get_screen_orientation"),&_OS::get_screen_orientation); + ObjectTypeDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second); ObjectTypeDB::bind_method(_MD("get_iterations_per_second"),&_OS::get_iterations_per_second); @@ -863,6 +877,14 @@ void _OS::_bind_methods() { BIND_CONSTANT( MONTH_NOVEMBER ); BIND_CONSTANT( MONTH_DECEMBER ); + BIND_CONSTANT( SCREEN_ORIENTATION_LANDSCAPE ); + BIND_CONSTANT( SCREEN_ORIENTATION_PORTRAIT ); + BIND_CONSTANT( SCREEN_ORIENTATION_REVERSE_LANDSCAPE ); + BIND_CONSTANT( SCREEN_ORIENTATION_REVERSE_PORTRAIT ); + BIND_CONSTANT( SCREEN_ORIENTATION_SENSOR_LANDSCAPE ); + BIND_CONSTANT( SCREEN_ORIENTATION_SENSOR_PORTRAIT ); + BIND_CONSTANT( SCREEN_ORIENTATION_SENSOR ); + BIND_CONSTANT( SYSTEM_DIR_DESKTOP); BIND_CONSTANT( SYSTEM_DIR_DCIM ); BIND_CONSTANT( SYSTEM_DIR_DOCUMENTS ); |
