diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-19 00:08:22 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-19 00:08:22 +0100 |
commit | ec0adfd23ebb35fd2b5e85718236ee2574083321 (patch) | |
tree | 850ab2b74dbeb954e2c49e428c16b47b12a86f97 /platform/android/export | |
parent | dc41f2504bf6c28eef078850682133066410c902 (diff) | |
parent | 6ef31541bff0458124a0818fcd8393a2a2964f54 (diff) | |
download | redot-engine-ec0adfd23ebb35fd2b5e85718236ee2574083321.tar.gz |
Merge pull request #88419 from m4gr3d/add_export_preset_advanced_options_toggle
Add an `Advanced Options` toggle to the editor export preset
Diffstat (limited to 'platform/android/export')
-rw-r--r-- | platform/android/export/export_plugin.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index d0db7b2e6c..a485b57a64 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -1911,13 +1911,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; } |