You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
[Export] Add readable descriptions and validation warnings to the export options.
This commit is contained in:
@@ -320,7 +320,7 @@ void EditorExportPlatformWeb::get_preset_features(const Ref<EditorExportPreset>
|
||||
r_features->push_back("wasm32");
|
||||
}
|
||||
|
||||
void EditorExportPlatformWeb::get_export_options(List<ExportOption> *r_options) {
|
||||
void EditorExportPlatformWeb::get_export_options(List<ExportOption> *r_options) const {
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
|
||||
|
||||
@@ -656,31 +656,35 @@ void EditorExportPlatformWeb::_server_thread_poll(void *data) {
|
||||
}
|
||||
|
||||
EditorExportPlatformWeb::EditorExportPlatformWeb() {
|
||||
server.instantiate();
|
||||
server_thread.start(_server_thread_poll, this);
|
||||
if (EditorNode::get_singleton()) {
|
||||
server.instantiate();
|
||||
server_thread.start(_server_thread_poll, this);
|
||||
|
||||
#ifdef MODULE_SVG_ENABLED
|
||||
Ref<Image> img = memnew(Image);
|
||||
const bool upsample = !Math::is_equal_approx(Math::round(EDSCALE), EDSCALE);
|
||||
Ref<Image> img = memnew(Image);
|
||||
const bool upsample = !Math::is_equal_approx(Math::round(EDSCALE), EDSCALE);
|
||||
|
||||
ImageLoaderSVG img_loader;
|
||||
img_loader.create_image_from_string(img, _web_logo_svg, EDSCALE, upsample, false);
|
||||
logo = ImageTexture::create_from_image(img);
|
||||
ImageLoaderSVG img_loader;
|
||||
img_loader.create_image_from_string(img, _web_logo_svg, EDSCALE, upsample, false);
|
||||
logo = ImageTexture::create_from_image(img);
|
||||
|
||||
img_loader.create_image_from_string(img, _web_run_icon_svg, EDSCALE, upsample, false);
|
||||
run_icon = ImageTexture::create_from_image(img);
|
||||
img_loader.create_image_from_string(img, _web_run_icon_svg, EDSCALE, upsample, false);
|
||||
run_icon = ImageTexture::create_from_image(img);
|
||||
#endif
|
||||
|
||||
Ref<Theme> theme = EditorNode::get_singleton()->get_editor_theme();
|
||||
if (theme.is_valid()) {
|
||||
stop_icon = theme->get_icon(SNAME("Stop"), SNAME("EditorIcons"));
|
||||
} else {
|
||||
stop_icon.instantiate();
|
||||
Ref<Theme> theme = EditorNode::get_singleton()->get_editor_theme();
|
||||
if (theme.is_valid()) {
|
||||
stop_icon = theme->get_icon(SNAME("Stop"), SNAME("EditorIcons"));
|
||||
} else {
|
||||
stop_icon.instantiate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorExportPlatformWeb::~EditorExportPlatformWeb() {
|
||||
server->stop();
|
||||
if (server.is_valid()) {
|
||||
server->stop();
|
||||
}
|
||||
server_quit = true;
|
||||
server_thread.wait_to_finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user