This commit is contained in:
Spartan322
2025-01-16 12:52:38 -05:00
284 changed files with 9458 additions and 1975 deletions

View File

@@ -72,7 +72,7 @@ bool DisplayServerAndroid::has_feature(Feature p_feature) const {
//case FEATURE_IME:
case FEATURE_MOUSE:
//case FEATURE_MOUSE_WARP:
//case FEATURE_NATIVE_DIALOG:
case FEATURE_NATIVE_DIALOG:
case FEATURE_NATIVE_DIALOG_INPUT:
case FEATURE_NATIVE_DIALOG_FILE:
//case FEATURE_NATIVE_DIALOG_FILE_EXTRA:
@@ -180,6 +180,19 @@ bool DisplayServerAndroid::clipboard_has() const {
}
}
Error DisplayServerAndroid::dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) {
GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java();
ERR_FAIL_NULL_V(godot_java, FAILED);
dialog_callback = p_callback;
return godot_java->show_dialog(p_title, p_description, p_buttons);
}
void DisplayServerAndroid::emit_dialog_callback(int p_button_index) {
if (dialog_callback.is_valid()) {
dialog_callback.call_deferred(p_button_index);
}
}
Error DisplayServerAndroid::dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) {
GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java();
ERR_FAIL_NULL_V(godot_java, FAILED);