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:
Fredia Huya-Kouadio 2024-06-24 06:45:31 -07:00
parent 2b7ea6223b
commit 2d3f6963b2
7 changed files with 46 additions and 5 deletions

View file

@ -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";
}