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

Android: Implement support for native dialog

This adds support for DisplayServer::dialog_show() on Android, aligning it with the functionality already available on macOS and Windows.
This commit is contained in:
Anish Mishra
2025-01-03 09:24:38 +05:30
parent bdf625bd54
commit cb9ee099ac
14 changed files with 347 additions and 37 deletions

View File

@@ -494,14 +494,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onNightModeChanged(JN
}
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_inputDialogCallback(JNIEnv *env, jclass clazz, jstring p_text) {
DisplayServerAndroid *ds = (DisplayServerAndroid *)DisplayServer::get_singleton();
if (ds) {
String text = jstring_to_string(p_text, env);
ds->emit_input_dialog_callback(text);
}
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_filePickerCallback(JNIEnv *env, jclass clazz, jboolean p_ok, jobjectArray p_selected_paths) {
DisplayServerAndroid *ds = (DisplayServerAndroid *)DisplayServer::get_singleton();
if (ds) {