| 228 | } |
| 229 | |
| 230 | void 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 | |
| 252 | void ProjectExportDialog::_edit_preset(int p_index) { |
| 253 | if (p_index < 0 || p_index >= presets->get_item_count()) { |
nothing calls this directly
no test coverage detected