diff options
| author | Rémi Verschelde | 2016-07-22 08:39:07 +0200 |
|---|---|---|
| committer | GitHub | 2016-07-22 08:39:07 +0200 |
| commit | c57b992774251d239961524a2cc575427ac4f484 (patch) | |
| tree | 65b3a30c04dd9b524411ebe0f89c7849c4bb2fe9 /core/bind/core_bind.cpp | |
| parent | a812e15603702073b3e8ab1ce33b4cb315c00619 (diff) | |
| parent | ec8c6e2c7c6689856a9a5547ece905339df994a8 (diff) | |
| download | godot-c57b992774251d239961524a2cc575427ac4f484.tar.gz godot-c57b992774251d239961524a2cc575427ac4f484.tar.zst godot-c57b992774251d239961524a2cc575427ac4f484.zip | |
Merge pull request #5847 from 29jm/patch-3
Expose virtual keyboard functions to GDScript
Diffstat (limited to 'core/bind/core_bind.cpp')
| -rw-r--r-- | core/bind/core_bind.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index e56684dc5..3e2f8ff26 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -894,6 +894,17 @@ void _OS::print_resources_by_type(const Vector<String>& p_types) { }; +bool _OS::has_virtual_keyboard() const { + return OS::get_singleton()->has_virtual_keyboard(); +} + +void _OS::show_virtual_keyboard(const String& p_existing_text) { + OS::get_singleton()->show_virtual_keyboard(p_existing_text, Rect2()); +} + +void _OS::hide_virtual_keyboard() { + OS::get_singleton()->hide_virtual_keyboard(); +} void _OS::print_all_resources(const String& p_to_file ) { @@ -1123,6 +1134,9 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("dump_memory_to_file","file"),&_OS::dump_memory_to_file); ObjectTypeDB::bind_method(_MD("dump_resources_to_file","file"),&_OS::dump_resources_to_file); + ObjectTypeDB::bind_method(_MD("has_virtual_keyboard"),&_OS::has_virtual_keyboard); + ObjectTypeDB::bind_method(_MD("show_virtual_keyboard", "existing_text"),&_OS::show_virtual_keyboard,DEFVAL("")); + ObjectTypeDB::bind_method(_MD("hide_virtual_keyboard"),&_OS::hide_virtual_keyboard); ObjectTypeDB::bind_method(_MD("print_resources_in_use","short"),&_OS::print_resources_in_use,DEFVAL(false)); ObjectTypeDB::bind_method(_MD("print_all_resources","tofile"),&_OS::print_all_resources,DEFVAL("")); |
