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

Method _update_export_all

editor/export/project_export.cpp:230–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void ProjectExportDialog::_update_export_all() {
231 bool can_export = EditorExport::get_singleton()->get_export_preset_count() > 0;
232
233 for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
234 Ref<EditorExportPreset> preset = EditorExport::get_singleton()->get_export_preset(i);
235 bool needs_templates;
236 String error;
237 if (preset->get_export_path().is_empty() || !preset->get_platform()->can_export(preset, error, needs_templates)) {
238 can_export = false;
239 break;
240 }
241 }
242
243 export_all_button->set_disabled(!can_export);
244
245 if (can_export) {
246 export_all_button->set_tooltip_text(TTR("Export the project for all the presets defined."));
247 } else {
248 export_all_button->set_tooltip_text(TTR("All presets must have an export path defined for Export All to work."));
249 }
250}
251
252void ProjectExportDialog::_edit_preset(int p_index) {
253 if (p_index < 0 || p_index >= presets->get_item_count()) {

Callers

nothing calls this directly

Calls 9

TTRFunction · 0.85
get_platformMethod · 0.80
get_export_presetMethod · 0.45
is_emptyMethod · 0.45
get_export_pathMethod · 0.45
can_exportMethod · 0.45
set_disabledMethod · 0.45
set_tooltip_textMethod · 0.45

Tested by

no test coverage detected