Allow to obtain virtual keyboard height
On mobile platforms virtual keyboards take up significant amount of screen space and UI containing a text box may need to be adjusted after the keyboard appears to keep the text box visible to user. This commit adds a way to obtain virtual keyabord height so that controls are aware of how much they need to move.
This commit is contained in:
@@ -858,6 +858,10 @@ void _OS::hide_virtual_keyboard() {
|
||||
OS::get_singleton()->hide_virtual_keyboard();
|
||||
}
|
||||
|
||||
int _OS::get_virtual_keyboard_height() {
|
||||
return OS::get_singleton()->get_virtual_keyboard_height();
|
||||
}
|
||||
|
||||
void _OS::print_all_resources(const String &p_to_file) {
|
||||
|
||||
OS::get_singleton()->print_all_resources(p_to_file);
|
||||
@@ -1064,6 +1068,7 @@ void _OS::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("has_virtual_keyboard"), &_OS::has_virtual_keyboard);
|
||||
ClassDB::bind_method(D_METHOD("show_virtual_keyboard", "existing_text"), &_OS::show_virtual_keyboard, DEFVAL(""));
|
||||
ClassDB::bind_method(D_METHOD("hide_virtual_keyboard"), &_OS::hide_virtual_keyboard);
|
||||
ClassDB::bind_method(D_METHOD("get_virtual_keyboard_height"), &_OS::get_virtual_keyboard_height);
|
||||
ClassDB::bind_method(D_METHOD("print_resources_in_use", "short"), &_OS::print_resources_in_use, DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("print_all_resources", "tofile"), &_OS::print_all_resources, DEFVAL(""));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user