diff options
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r-- | editor/project_manager.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 7ce4029476..9efd037772 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1526,6 +1526,13 @@ void ProjectManager::_open_selected_projects_ask() { } int config_version = (int)cf->get_value("", "config_version", 0); + + // Check if the config_version property was empty or 0 + if (config_version == 0) { + ask_update_settings->set_text(vformat(TTR("The following project settings file does not specify the version of Godot through which it was created.\n\n%s\n\nIf you proceed with opening it, it will be converted to Godot's current configuration file format.\nWarning: You will not be able to open the project with previous versions of the engine anymore."), conf)); + ask_update_settings->popup_centered_minsize(); + return; + } // Check if we need to convert project settings from an earlier engine version if (config_version < ProjectSettings::CONFIG_VERSION) { ask_update_settings->set_text(vformat(TTR("The following project settings file was generated by an older engine version, and needs to be converted for this version:\n\n%s\n\nDo you want to convert it?\nWarning: You will not be able to open the project with previous versions of the engine anymore."), conf)); @@ -1888,13 +1895,11 @@ ProjectManager::ProjectManager() { Panel *panel = memnew(Panel); gui_base->add_child(panel); panel->set_anchors_and_margins_preset(Control::PRESET_WIDE); + panel->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles")); VBoxContainer *vb = memnew(VBoxContainer); panel->add_child(vb); - vb->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 20 * EDSCALE); - vb->set_margin(MARGIN_TOP, 4 * EDSCALE); - vb->set_margin(MARGIN_BOTTOM, -4 * EDSCALE); - vb->add_constant_override("separation", 15 * EDSCALE); + vb->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 8 * EDSCALE); String cp; cp += 0xA9; @@ -1902,11 +1907,9 @@ ProjectManager::ProjectManager() { HBoxContainer *top_hb = memnew(HBoxContainer); vb->add_child(top_hb); - CenterContainer *ccl = memnew(CenterContainer); Label *l = memnew(Label); l->set_text(VERSION_NAME + String(" - ") + TTR("Project Manager")); - ccl->add_child(l); - top_hb->add_child(ccl); + top_hb->add_child(l); top_hb->add_spacer(); l = memnew(Label); String hash = String(VERSION_HASH); @@ -2053,6 +2056,8 @@ ProjectManager::ProjectManager() { settings_hb->set_h_grow_direction(Control::GROW_DIRECTION_BEGIN); language_btn = memnew(OptionButton); + language_btn->set_flat(true); + language_btn->set_focus_mode(Control::FOCUS_NONE); Vector<String> editor_languages; List<PropertyInfo> editor_settings_properties; |