summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-11 17:07:14 +0200
committerGitHub <noreply@github.com>2017-07-11 17:07:14 +0200
commita5bb77d5232668045fc2fb82637b00b5295b8741 (patch)
tree4d90c5017f1557b381d43eb7d4b805e9c3b0d9f0 /core
parentfaae28c9551a8e57577762e8e7ed84d0d66c0744 (diff)
parent7358766ff69e064d8a31b18c54e3c1e22e303cb6 (diff)
Merge pull request #9366 from GodotExplorer/pr-ime-position-flow-cursor
IME window follow the input cursor.
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp7
-rw-r--r--core/bind/core_bind.h2
-rw-r--r--core/os/os.h2
3 files changed, 11 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 095f058ed9..e863078a48 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -300,6 +300,11 @@ bool _OS::get_borderless_window() const {
return OS::get_singleton()->get_borderless_window();
}
+void _OS::set_ime_position(const Point2 &p_pos) {
+
+ return OS::get_singleton()->set_ime_position(p_pos);
+}
+
void _OS::set_use_file_access_save_and_swap(bool p_enable) {
FileAccess::set_backup_save(p_enable);
@@ -993,6 +998,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_borderless_window", "borderless"), &_OS::set_borderless_window);
ClassDB::bind_method(D_METHOD("get_borderless_window"), &_OS::get_borderless_window);
+ ClassDB::bind_method(D_METHOD("set_ime_position"), &_OS::set_ime_position);
+
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);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 87d84c0732..f72f665d9e 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -158,6 +158,8 @@ public:
virtual void set_borderless_window(bool p_borderless);
virtual bool get_borderless_window() const;
+ virtual void set_ime_position(const Point2 &p_pos);
+
Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track);
bool native_video_is_playing();
void native_video_pause();
diff --git a/core/os/os.h b/core/os/os.h
index 11fe8b44e3..cafd1f4e14 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -179,6 +179,8 @@ public:
virtual void set_borderless_window(int p_borderless) {}
virtual bool get_borderless_window() { return 0; }
+ virtual void set_ime_position(const Point2 &p_pos) {}
+
virtual Error open_dynamic_library(const String p_path, void *&p_library_handle) { return ERR_UNAVAILABLE; };
virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; };
virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle) { return ERR_UNAVAILABLE; };