diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index 1872c5b344d..cc9104e948a 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -212,7 +212,9 @@ bool ProgressDialog::task_step(const String &p_task, const String &p_state, int OS::get_singleton()->force_process_input(); } +#ifndef ANDROID_ENABLED Main::iteration(); // this will not work on a lot of platforms, so it's only meant for the editor +#endif return cancelled; } diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt index 740f3f48d31..5623c41e2b9 100644 --- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt +++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt @@ -77,6 +77,12 @@ open class GodotEditor : FullScreenGodotApp() { } super.onCreate(savedInstanceState) + + // Enable long press, panning and scaling gestures + godotFragment?.mView?.inputHandler?.apply { + enableLongPress(enableLongPressGestures()) + enablePanningAndScalingGestures(enablePanAndScaleGestures()) + } } private fun updateCommandLineParams(args: Array?) { @@ -148,6 +154,16 @@ open class GodotEditor : FullScreenGodotApp() { */ protected open fun overrideOrientationRequest() = true + /** + * Enable long press gestures for the Godot Android editor. + */ + protected open fun enableLongPressGestures() = true + + /** + * Enable pan and scale gestures for the Godot Android editor. + */ + protected open fun enablePanAndScaleGestures() = true + override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) // Check if we got the MANAGE_EXTERNAL_STORAGE permission diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.kt index 783095f93aa..b9536a70663 100644 --- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.kt +++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.kt @@ -35,4 +35,8 @@ package org.godotengine.editor */ class GodotGame : GodotEditor() { override fun overrideOrientationRequest() = false + + override fun enableLongPressGestures() = false + + override fun enablePanAndScaleGestures() = false }