Update the visibility for the custom templates for all platforms
Hide the custom template options behind the `Advanced Options` toggle
This commit is contained in:
@ -1979,7 +1979,7 @@ bool EditorExportPlatformAndroid::get_export_option_visibility(const EditorExpor
|
||||
}
|
||||
if (p_option == "custom_template/debug" || p_option == "custom_template/release") {
|
||||
// The APK templates are ignored if Gradle build is enabled.
|
||||
return !bool(p_preset->get("gradle_build/use_gradle_build"));
|
||||
return advanced_options_enabled && !bool(p_preset->get("gradle_build/use_gradle_build"));
|
||||
}
|
||||
|
||||
// Hide .NET embedding option (always enabled).
|
||||
|
||||
@ -254,7 +254,15 @@ bool EditorExportPlatformIOS::get_export_option_visibility(const EditorExportPre
|
||||
}
|
||||
|
||||
bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
|
||||
if (p_option.begins_with("privacy") || p_option == "application/generate_simulator_library_if_missing" || (p_option.begins_with("icons/") && !p_option.begins_with("icons/icon") && !p_option.begins_with("icons/app_store"))) {
|
||||
if (p_option.begins_with("privacy") ||
|
||||
p_option == "application/generate_simulator_library_if_missing" ||
|
||||
(p_option.begins_with("icons/") && !p_option.begins_with("icons/icon") && !p_option.begins_with("icons/app_store")) ||
|
||||
p_option == "custom_template/debug" ||
|
||||
p_option == "custom_template/release" ||
|
||||
p_option == "application/additional_plist_content" ||
|
||||
p_option == "application/delete_old_export_files_unconditionally" ||
|
||||
p_option == "application/icon_interpolation" ||
|
||||
p_option == "application/signature") {
|
||||
return advanced_options_enabled;
|
||||
}
|
||||
|
||||
|
||||
@ -171,7 +171,9 @@ bool EditorExportPlatformLinuxBSD::get_export_option_visibility(const EditorExpo
|
||||
if (!ssh && p_option != "ssh_remote_deploy/enabled" && p_option.begins_with("ssh_remote_deploy/")) {
|
||||
return false;
|
||||
}
|
||||
if (p_option == "dotnet/embed_build_outputs") {
|
||||
if (p_option == "dotnet/embed_build_outputs" ||
|
||||
p_option == "custom_template/debug" ||
|
||||
p_option == "custom_template/release") {
|
||||
return advanced_options_enabled;
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -332,7 +332,21 @@ bool EditorExportPlatformMacOS::get_export_option_visibility(const EditorExportP
|
||||
}
|
||||
|
||||
bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
|
||||
if (p_option.begins_with("privacy") || p_option == "codesign/entitlements/additional") {
|
||||
if (p_option.begins_with("privacy") ||
|
||||
p_option == "codesign/entitlements/additional" ||
|
||||
p_option == "custom_template/debug" ||
|
||||
p_option == "custom_template/release" ||
|
||||
p_option == "application/additional_plist_content" ||
|
||||
p_option == "application/export_angle" ||
|
||||
p_option == "application/icon_interpolation" ||
|
||||
p_option == "application/signature" ||
|
||||
p_option == "display/high_res" ||
|
||||
p_option == "xcode/platform_build" ||
|
||||
p_option == "xcode/sdk_build" ||
|
||||
p_option == "xcode/sdk_name" ||
|
||||
p_option == "xcode/sdk_version" ||
|
||||
p_option == "xcode/xcode_build" ||
|
||||
p_option == "xcode/xcode_version") {
|
||||
return advanced_options_enabled;
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,6 +372,16 @@ void EditorExportPlatformWeb::get_export_options(List<ExportOption> *r_options)
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::COLOR, "progressive_web_app/background_color", PROPERTY_HINT_COLOR_NO_ALPHA), Color()));
|
||||
}
|
||||
|
||||
bool EditorExportPlatformWeb::get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const {
|
||||
bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
|
||||
if (p_option == "custom_template/debug" ||
|
||||
p_option == "custom_template/release") {
|
||||
return advanced_options_enabled;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
String EditorExportPlatformWeb::get_name() const {
|
||||
return "Web";
|
||||
}
|
||||
|
||||
@ -112,6 +112,7 @@ public:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
|
||||
|
||||
virtual void get_export_options(List<ExportOption> *r_options) const override;
|
||||
virtual bool get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const override;
|
||||
|
||||
virtual String get_name() const override;
|
||||
virtual String get_os_name() const override;
|
||||
|
||||
@ -398,7 +398,13 @@ bool EditorExportPlatformWindows::get_export_option_visibility(const EditorExpor
|
||||
return false;
|
||||
}
|
||||
|
||||
if (p_option == "dotnet/embed_build_outputs") {
|
||||
if (p_option == "dotnet/embed_build_outputs" ||
|
||||
p_option == "custom_template/debug" ||
|
||||
p_option == "custom_template/release" ||
|
||||
p_option == "application/d3d12_agility_sdk_multiarch" ||
|
||||
p_option == "application/export_angle" ||
|
||||
p_option == "application/export_d3d12" ||
|
||||
p_option == "application/icon_interpolation") {
|
||||
return advanced_options_enabled;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user