1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

[DisplayServer] Implement has_hardware_keyboard method for Android and iOS.

This commit is contained in:
bruvzg
2024-10-02 20:01:27 +03:00
parent 1917bc3454
commit 25f439c573
11 changed files with 56 additions and 1 deletions

View File

@@ -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()));