diff options
| author | Juan Linietsky | 2016-07-10 12:41:05 -0300 |
|---|---|---|
| committer | GitHub | 2016-07-10 12:41:05 -0300 |
| commit | 28641fd9b8e73b3fae57ea4ccf0356629507ea3a (patch) | |
| tree | 1aaf9668577261aa4f8f6a2e011d8951476b7d71 /core | |
| parent | b06eca108af4da333e84f553ac1e8ca25e6c1cdf (diff) | |
| parent | 7a142780f05d56aa751690c8716bd8aab429b140 (diff) | |
| download | godot-28641fd9b8e73b3fae57ea4ccf0356629507ea3a.tar.gz godot-28641fd9b8e73b3fae57ea4ccf0356629507ea3a.tar.zst godot-28641fd9b8e73b3fae57ea4ccf0356629507ea3a.zip | |
Merge pull request #5525 from SuperUserNameMan/window_get_latin_kb_variant
windows get_latin_keyboard_variant() implementation and gdscript binding, #5503
Diffstat (limited to 'core')
| -rw-r--r-- | core/bind/core_bind.cpp | 13 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index ace7e7c7b..6edc292b6 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -435,6 +435,18 @@ String _OS::get_locale() const { return OS::get_singleton()->get_locale(); } +String _OS::get_latin_keyboard_variant() const { + switch( OS::get_singleton()->get_latin_keyboard_variant() ) { + case OS::LATIN_KEYBOARD_QWERTY: return "QWERTY"; + case OS::LATIN_KEYBOARD_QWERTZ: return "QWERTZ"; + case OS::LATIN_KEYBOARD_AZERTY: return "AZERTY"; + case OS::LATIN_KEYBOARD_QZERTY: return "QZERTY"; + case OS::LATIN_KEYBOARD_DVORAK: return "DVORAK"; + case OS::LATIN_KEYBOARD_NEO : return "NEO"; + default: return "ERROR"; + } +} + String _OS::get_model_name() const { return OS::get_singleton()->get_model_name(); @@ -1097,6 +1109,7 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_ticks_msec"),&_OS::get_ticks_msec); ObjectTypeDB::bind_method(_MD("get_splash_tick_msec"),&_OS::get_splash_tick_msec); ObjectTypeDB::bind_method(_MD("get_locale"),&_OS::get_locale); + ObjectTypeDB::bind_method(_MD("get_latin_keyboard_variant"),&_OS::get_latin_keyboard_variant); ObjectTypeDB::bind_method(_MD("get_model_name"),&_OS::get_model_name); ObjectTypeDB::bind_method(_MD("get_custom_level"),&_OS::get_custom_level); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 856d942d0..5bd427578 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -192,6 +192,8 @@ public: Vector<String> get_cmdline_args(); String get_locale() const; + String get_latin_keyboard_variant() const; + String get_model_name() const; MainLoop *get_main_loop() const; |
