diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-10-04 11:22:02 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-10-04 11:22:02 +0200 |
commit | 5ac62a68631efcae639f7eb18b1bd8e1e09d994d (patch) | |
tree | 184c93d9119ca1ec6f67605201077f6e6b68e38f /servers/display_server.cpp | |
parent | 6e03910578f240b465f5e56952eb5694dc513787 (diff) | |
parent | 25f439c573eefbc7cff2ea92952c9c68f1f0744a (diff) | |
download | redot-engine-5ac62a68631efcae639f7eb18b1bd8e1e09d994d.tar.gz |
Merge pull request #97743 from bruvzg/has_kbd
[DisplayServer] Implement `has_hardware_keyboard` method for Android and iOS.
Diffstat (limited to 'servers/display_server.cpp')
-rw-r--r-- | servers/display_server.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index f092e23171..ce0d6cb996 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -634,6 +634,10 @@ int DisplayServer::virtual_keyboard_get_height() const { ERR_FAIL_V_MSG(0, "Virtual keyboard not supported by this display server."); } +bool DisplayServer::has_hardware_keyboard() const { + return true; +} + void DisplayServer::cursor_set_shape(CursorShape p_shape) { WARN_PRINT("Cursor shape not supported by this display server."); } @@ -976,6 +980,8 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("virtual_keyboard_get_height"), &DisplayServer::virtual_keyboard_get_height); + ClassDB::bind_method(D_METHOD("has_hardware_keyboard"), &DisplayServer::has_hardware_keyboard); + ClassDB::bind_method(D_METHOD("cursor_set_shape", "shape"), &DisplayServer::cursor_set_shape); ClassDB::bind_method(D_METHOD("cursor_get_shape"), &DisplayServer::cursor_get_shape); ClassDB::bind_method(D_METHOD("cursor_set_custom_image", "cursor", "shape", "hotspot"), &DisplayServer::cursor_set_custom_image, DEFVAL(CURSOR_ARROW), DEFVAL(Vector2())); |