mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
[Android] Implement native input dialog support
This commit is contained in:
parent
08f9cba0fb
commit
be5d7f757d
11 changed files with 87 additions and 3 deletions
|
@ -540,6 +540,14 @@ 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_requestPermissionResult(JNIEnv *env, jclass clazz, jstring p_permission, jboolean p_result) {
|
||||
String permission = jstring_to_string(p_permission, env);
|
||||
if (permission == "android.permission.RECORD_AUDIO" && p_result) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue