MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / popup_export

Method popup_export

editor/export/project_export.cpp:129–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void ProjectExportDialog::popup_export() {
130 add_preset->get_popup()->clear();
131 for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) {
132 Ref<EditorExportPlatform> plat = EditorExport::get_singleton()->get_export_platform(i);
133
134 add_preset->get_popup()->add_icon_item(plat->get_logo(), plat->get_name());
135 }
136
137 _update_presets();
138 if (presets->get_current() >= 0) {
139 _update_current_preset(); // triggers rescan for templates if newly installed
140 }
141
142 // Restore valid window bounds or pop up at default size.
143 Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "export", Rect2());
144 if (saved_size != Rect2()) {
145 popup(saved_size);
146 } else {
147 popup_centered_clamped(Size2(900, 500) * EDSCALE, 0.7);
148 }
149}
150
151void ProjectExportDialog::_add_preset(int p_platform) {
152 Ref<EditorExportPreset> preset = EditorExport::get_singleton()->get_export_platform(p_platform)->create_preset();

Callers 1

_menu_option_confirmMethod · 0.80

Calls 10

get_project_metadataMethod · 0.80
Rect2Class · 0.50
clearMethod · 0.45
get_popupMethod · 0.45
get_export_platformMethod · 0.45
add_icon_itemMethod · 0.45
get_logoMethod · 0.45
get_nameMethod · 0.45
get_currentMethod · 0.45

Tested by

no test coverage detected