summaryrefslogtreecommitdiffstats
path: root/platform/android/export
diff options
context:
space:
mode:
authorFredia Huya-Kouadio <fhuyakou@gmail.com>2024-02-16 14:05:50 -0800
committerFredia Huya-Kouadio <fhuyakou@gmail.com>2024-02-18 10:43:58 -0800
commit6ef31541bff0458124a0818fcd8393a2a2964f54 (patch)
treee7bc7bd85ca7403d3fe0f9152bc1f8df64e82a1f /platform/android/export
parent8ff821670561466a5ff72044ad574dcb955b66c2 (diff)
downloadredot-engine-6ef31541bff0458124a0818fcd8393a2a2964f54.tar.gz
Add an `Advanced Options` toggle to the editor export preset
Diffstat (limited to 'platform/android/export')
-rw-r--r--platform/android/export/export_plugin.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 52cb366d9f..612bf2d3ac 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -1883,13 +1883,22 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
}
bool EditorExportPlatformAndroid::get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const {
+ if (p_preset == nullptr) {
+ return true;
+ }
+
+ bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
+ if (p_option == "graphics/opengl_debug" ||
+ p_option == "command_line/extra_args" ||
+ p_option == "permissions/custom_permissions") {
+ return advanced_options_enabled;
+ }
if (p_option == "gradle_build/gradle_build_directory" || p_option == "gradle_build/android_source_template") {
- // @todo These are experimental options - keep them hidden for now.
- //return (bool)p_preset->get("gradle_build/use_gradle_build");
- return false;
- } else if (p_option == "custom_template/debug" || p_option == "custom_template/release") {
+ return advanced_options_enabled && bool(p_preset->get("gradle_build/use_gradle_build"));
+ }
+ if (p_option == "custom_template/debug" || p_option == "custom_template/release") {
// The APK templates are ignored if Gradle build is enabled.
- return !p_preset->get("gradle_build/use_gradle_build");
+ return advanced_options_enabled && !bool(p_preset->get("gradle_build/use_gradle_build"));
}
return true;
}