You've already forked godot
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:
@@ -216,6 +216,14 @@ public class GodotIO {
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean hasHardwareKeyboard() {
|
||||
if (edit != null) {
|
||||
return edit.hasHardwareKeyboard();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void showKeyboard(String p_existing_text, int p_type, int p_max_input_length, int p_cursor_start, int p_cursor_end) {
|
||||
if (edit != null) {
|
||||
edit.showKeyboard(p_existing_text, GodotEditText.VirtualKeyboardType.values()[p_type], p_max_input_length, p_cursor_start, p_cursor_end);
|
||||
|
||||
@@ -264,7 +264,7 @@ public class GodotEditText extends EditText {
|
||||
isModifiedKey;
|
||||
}
|
||||
|
||||
boolean hasHardwareKeyboard() {
|
||||
public boolean hasHardwareKeyboard() {
|
||||
Configuration config = getResources().getConfiguration();
|
||||
boolean hasHardwareKeyboardConfig = config.keyboard != Configuration.KEYBOARD_NOKEYS &&
|
||||
config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO;
|
||||
|
||||
Reference in New Issue
Block a user