summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaigi100 <taigi100@pm.me>2022-03-23 20:11:23 +0200
committertaigi100 <taigi100@pm.me>2022-03-24 10:25:59 +0200
commitd8d73cdd023253d778acf0e826b38be4046a6e1f (patch)
tree93f548e3c8a0518d5baf77d849e52055e2aab735
parentd7d528c15f0e858b52bb0f510ff47e65c2341de1 (diff)
Update properties to properly filter for templates.
-rw-r--r--editor/editor_export.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index bbc104301d..4048f4783d 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1760,8 +1760,9 @@ void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &
}
void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE), ""));
+ String ext_filter = (get_os_name() == "Windows") ? "*.exe" : "";
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "debug/export_console_script", PROPERTY_HINT_ENUM, "No,Debug Only,Debug and Release"), 1));