summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorGilles Roudiere <gilles.roudiere@gmail.com>2017-10-04 18:16:28 +0200
committerGitHub <noreply@github.com>2017-10-04 18:16:28 +0200
commit5b9b158354c9b3eaa5bcebd726347dd9db704096 (patch)
tree2e6a0906a3585772d7348ac820356dcac1ff47b6 /core/os
parent7c2cda72b859509758f43e60fee6798b6175590b (diff)
parent275e537058ed870c4d37002f2110b7866d2ed1ae (diff)
Merge pull request #11823 from endragor/virtual-keyboard-height
Allow to obtain virtual keyboard height
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os.cpp4
-rw-r--r--core/os/os.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index f2295823b2..4accd65bab 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -193,6 +193,10 @@ void OS::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_scr
void OS::hide_virtual_keyboard() {
}
+int OS::get_virtual_keyboard_height() const {
+ return 0;
+}
+
void OS::print_all_resources(String p_to_file) {
ERR_FAIL_COND(p_to_file != "" && _OSPRF);
diff --git a/core/os/os.h b/core/os/os.h
index e819666a73..6fcfd71332 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -315,6 +315,9 @@ public:
virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2());
virtual void hide_virtual_keyboard();
+ // returns height of the currently shown virtual keyboard (0 if keyboard is hidden)
+ virtual int get_virtual_keyboard_height() const;
+
virtual void set_cursor_shape(CursorShape p_shape) = 0;
virtual bool get_swap_ok_cancel() { return false; }