summaryrefslogtreecommitdiff
path: root/core/bind/core_bind.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-12-11 18:00:48 +0100
committerGitHub <noreply@github.com>2018-12-11 18:00:48 +0100
commit4c41e29c8e796f97a714da784a7cecae8933b202 (patch)
treec36b06c9a91503d5af39c4f973908cff39194608 /core/bind/core_bind.cpp
parent573956915efefb1cda0a5349c7e7aaeb0363df1d (diff)
parent4554c682e6c9749116c79313d6f08cd6e8b7e6e6 (diff)
Merge pull request #23923 from bruvzg/ime_gdscript
Changes IME to make it possible to use it from gdscript/gdnative
Diffstat (limited to 'core/bind/core_bind.cpp')
-rw-r--r--core/bind/core_bind.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 0032c43179..8641af84d9 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -378,12 +378,20 @@ bool _OS::get_borderless_window() const {
void _OS::set_ime_active(const bool p_active) {
- return OS::get_singleton()->set_ime_active(p_active);
+ OS::get_singleton()->set_ime_active(p_active);
}
void _OS::set_ime_position(const Point2 &p_pos) {
- return OS::get_singleton()->set_ime_position(p_pos);
+ OS::get_singleton()->set_ime_position(p_pos);
+}
+
+Point2 _OS::get_ime_selection() const {
+ return OS::get_singleton()->get_ime_selection();
+}
+
+String _OS::get_ime_text() const {
+ return OS::get_singleton()->get_ime_text();
}
void _OS::set_use_file_access_save_and_swap(bool p_enable) {
@@ -1134,7 +1142,10 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_window_per_pixel_transparency_enabled"), &_OS::get_window_per_pixel_transparency_enabled);
ClassDB::bind_method(D_METHOD("set_window_per_pixel_transparency_enabled", "enabled"), &_OS::set_window_per_pixel_transparency_enabled);
+ ClassDB::bind_method(D_METHOD("set_ime_active", "active"), &_OS::set_ime_active);
ClassDB::bind_method(D_METHOD("set_ime_position", "position"), &_OS::set_ime_position);
+ ClassDB::bind_method(D_METHOD("get_ime_selection"), &_OS::get_ime_selection);
+ ClassDB::bind_method(D_METHOD("get_ime_text"), &_OS::get_ime_text);
ClassDB::bind_method(D_METHOD("set_screen_orientation", "orientation"), &_OS::set_screen_orientation);
ClassDB::bind_method(D_METHOD("get_screen_orientation"), &_OS::get_screen_orientation);