diff options
Diffstat (limited to 'editor/project_export.cpp')
-rw-r--r-- | editor/project_export.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp index ad88e1b45b..fcb714bdf7 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -49,8 +49,8 @@ #include "servers/display_server.h" void ProjectExportDialog::_theme_changed() { - duplicate_preset->set_icon(presets->get_theme_icon("Duplicate", "EditorIcons")); - delete_preset->set_icon(presets->get_theme_icon("Remove", "EditorIcons")); + duplicate_preset->set_icon(presets->get_theme_icon(SNAME("Duplicate"), SNAME("EditorIcons"))); + delete_preset->set_icon(presets->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); } void ProjectExportDialog::_notification(int p_what) { @@ -61,8 +61,8 @@ void ProjectExportDialog::_notification(int p_what) { } } break; case NOTIFICATION_READY: { - duplicate_preset->set_icon(presets->get_theme_icon("Duplicate", "EditorIcons")); - delete_preset->set_icon(presets->get_theme_icon("Remove", "EditorIcons")); + duplicate_preset->set_icon(presets->get_theme_icon(SNAME("Duplicate"), SNAME("EditorIcons"))); + delete_preset->set_icon(presets->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); connect("confirmed", callable_mp(this, &ProjectExportDialog::_export_pck_zip)); _update_export_all(); } break; @@ -340,8 +340,8 @@ void ProjectExportDialog::_update_feature_list() { } } - for (List<String>::Element *E = features.front(); E; E = E->next()) { - fset.insert(E->get()); + for (const String &E : features) { + fset.insert(E); } custom_feature_display->clear(); @@ -567,8 +567,8 @@ void ProjectExportDialog::_duplicate_preset() { preset->set_exclude_filter(current->get_exclude_filter()); preset->set_custom_features(current->get_custom_features()); - for (const List<PropertyInfo>::Element *E = current->get_properties().front(); E; E = E->next()) { - preset->set(E->get().name, current->get(E->get().name)); + for (const PropertyInfo &E : current->get_properties()) { + preset->set(E.name, current->get(E.name)); } EditorExport::get_singleton()->add_export_preset(preset); @@ -730,7 +730,7 @@ void ProjectExportDialog::_fill_resource_tree() { bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem *p_item, Ref<EditorExportPreset> ¤t, bool p_only_scenes) { p_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK); - p_item->set_icon(0, presets->get_theme_icon("folder", "FileDialog")); + p_item->set_icon(0, presets->get_theme_icon(SNAME("folder"), SNAME("FileDialog"))); p_item->set_text(0, p_dir->get_name() + "/"); p_item->set_editable(0, true); p_item->set_metadata(0, p_dir->get_path()); @@ -1013,8 +1013,11 @@ ProjectExportDialog::ProjectExportDialog() { preset_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL); hbox->add_child(preset_vb); + Label *l = memnew(Label(TTR("Presets"))); + l->set_theme_type_variation("HeaderSmall"); + HBoxContainer *preset_hb = memnew(HBoxContainer); - preset_hb->add_child(memnew(Label(TTR("Presets")))); + preset_hb->add_child(l); preset_hb->add_spacer(); preset_vb->add_child(preset_hb); @@ -1150,7 +1153,7 @@ ProjectExportDialog::ProjectExportDialog() { enc_directory = memnew(CheckButton); enc_directory->connect("toggled", callable_mp(this, &ProjectExportDialog::_enc_directory_changed)); - enc_directory->set_text("Encrypt Index (File Names and Info)"); + enc_directory->set_text(TTR("Encrypt Index (File Names and Info)")); sec_vb->add_child(enc_directory); enc_in_filters = memnew(LineEdit); @@ -1169,7 +1172,7 @@ ProjectExportDialog::ProjectExportDialog() { script_key->connect("text_changed", callable_mp(this, &ProjectExportDialog::_script_encryption_key_changed)); script_key_error = memnew(Label); script_key_error->set_text("- " + TTR("Invalid Encryption Key (must be 64 hexadecimal characters long)")); - script_key_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color("error_color", "Editor")); + script_key_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), SNAME("Editor"))); sec_vb->add_margin_child(TTR("Encryption Key (256-bits as hexadecimal):"), script_key); sec_vb->add_child(script_key_error); sections->add_child(sec_vb); @@ -1216,7 +1219,7 @@ ProjectExportDialog::ProjectExportDialog() { export_all_dialog = memnew(ConfirmationDialog); add_child(export_all_dialog); - export_all_dialog->set_title("Export All"); + export_all_dialog->set_title(TTR("Export All")); export_all_dialog->set_text(TTR("Choose an export mode:")); export_all_dialog->get_ok_button()->hide(); export_all_dialog->add_button(TTR("Debug"), true, "debug"); @@ -1238,7 +1241,7 @@ ProjectExportDialog::ProjectExportDialog() { export_error = memnew(Label); main_vb->add_child(export_error); export_error->hide(); - export_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color("error_color", "Editor")); + export_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), SNAME("Editor"))); export_templates_error = memnew(HBoxContainer); main_vb->add_child(export_templates_error); @@ -1246,11 +1249,11 @@ ProjectExportDialog::ProjectExportDialog() { Label *export_error2 = memnew(Label); export_templates_error->add_child(export_error2); - export_error2->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color("error_color", "Editor")); + export_error2->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), SNAME("Editor"))); export_error2->set_text(" - " + TTR("Export templates for this platform are missing:") + " "); error_dialog = memnew(AcceptDialog); - error_dialog->set_title("Error"); + error_dialog->set_title(TTR("Error")); error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " "); main_vb->add_child(error_dialog); error_dialog->hide(); |