Move engine build profile editor to Tools submenu

- Rename it to Engine Compilation Configuration Editor. This makes
  it clearer that it requires compiling the engine to work ("build"
  can be understood as exporting a project or building C# solutions
  by some).
- Add it to the editor command palette and allow defining a keyboard
  shortcut for it, for consistency with other tools.
This commit is contained in:
Hugo Locurcio 2024-04-09 02:28:08 +02:00
parent 9d6bdbc56e
commit 8e924bcb22
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
2 changed files with 8 additions and 9 deletions

View File

@ -861,7 +861,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
class_list->connect("item_edited", callable_mp(this, &EditorBuildProfileManager::_class_list_item_edited), CONNECT_DEFERRED);
class_list->connect("item_collapsed", callable_mp(this, &EditorBuildProfileManager::_class_list_item_collapsed));
// It will be displayed once the user creates or chooses a profile.
main_vbc->add_margin_child(TTR("Configure Engine Build Profile:"), class_list, true);
main_vbc->add_margin_child(TTR("Configure Engine Compilation Profile:"), class_list, true);
description_bit = memnew(EditorHelpBit);
description_bit->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
@ -875,7 +875,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
import_profile = memnew(EditorFileDialog);
add_child(import_profile);
import_profile->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
import_profile->add_filter("*.build", TTR("Engine Build Profile"));
import_profile->add_filter("*.build", TTR("Engine Compilation Profile"));
import_profile->connect("files_selected", callable_mp(this, &EditorBuildProfileManager::_import_profile));
import_profile->set_title(TTR("Load Profile"));
import_profile->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
@ -883,7 +883,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
export_profile = memnew(EditorFileDialog);
add_child(export_profile);
export_profile->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
export_profile->add_filter("*.build", TTR("Engine Build Profile"));
export_profile->add_filter("*.build", TTR("Engine Compilation Profile"));
export_profile->connect("file_selected", callable_mp(this, &EditorBuildProfileManager::_export_profile));
export_profile->set_title(TTR("Export Profile"));
export_profile->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
@ -892,7 +892,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
main_vbc->add_margin_child(TTR("Forced Classes on Detect:"), force_detect_classes);
force_detect_classes->connect("text_changed", callable_mp(this, &EditorBuildProfileManager::_force_detect_classes_changed));
set_title(TTR("Edit Build Configuration Profile"));
set_title(TTR("Edit Compilation Configuration Profile"));
singleton = this;
}

View File

@ -2896,9 +2896,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
}
} break;
case TOOLS_BUILD_PROFILE_MANAGER: {
build_profile_manager->popup_centered_clamped(Size2(700, 800) * EDSCALE, 0.8);
} break;
case RUN_USER_DATA_FOLDER: {
// Ensure_user_data_dir() to prevent the edge case: "Open User Data Folder" won't work after the project was renamed in ProjectSettingsEditor unless the project is saved.
OS::get_singleton()->ensure_user_data_dir();
@ -3203,6 +3200,9 @@ void EditorNode::_tool_menu_option(int p_idx) {
case TOOLS_ORPHAN_RESOURCES: {
orphan_resources->show();
} break;
case TOOLS_BUILD_PROFILE_MANAGER: {
build_profile_manager->popup_centered_clamped(Size2(700, 800) * EDSCALE, 0.8);
} break;
case TOOLS_SURFACE_UPGRADE: {
surface_upgrade_dialog->popup_on_demand();
} break;
@ -6783,13 +6783,12 @@ EditorNode::EditorNode() {
#endif
project_menu->add_separator();
project_menu->add_item(TTR("Customize Engine Build Configuration..."), TOOLS_BUILD_PROFILE_MANAGER);
project_menu->add_separator();
tool_menu = memnew(PopupMenu);
tool_menu->connect("index_pressed", callable_mp(this, &EditorNode::_tool_menu_option));
project_menu->add_submenu_node_item(TTR("Tools"), tool_menu);
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/orphan_resource_explorer", TTR("Orphan Resource Explorer...")), TOOLS_ORPHAN_RESOURCES);
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/engine_compilation_configuration_editor", TTR("Engine Compilation Configuration Editor...")), TOOLS_BUILD_PROFILE_MANAGER);
tool_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/upgrade_mesh_surfaces", TTR("Upgrade Mesh Surfaces...")), TOOLS_SURFACE_UPGRADE);
project_menu->add_separator();