1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Mono: Some editor usability improvements

- Move "Mono" popup menu from the top right corner to `Projects -> Tools` as a submenu.
- Add "Build solution" button to the top right corner. Makes it more visible and quicker to access.
- Fix build list in the bottom panel unselect an item when clicking on empty space. Previously it would hide the issues panel but the item would remain selected, making it impossible to display the issues panel again if there was only one item.
This commit is contained in:
Ignacio Etcheverry
2019-02-27 02:45:17 +01:00
parent 823fb59e10
commit 3e0846e65b
3 changed files with 20 additions and 13 deletions

View File

@@ -167,9 +167,6 @@ void GodotSharpEditor::_remove_create_sln_menu_option() {
menu_popup->remove_item(menu_popup->get_item_index(MENU_CREATE_SLN));
if (menu_popup->get_item_count() == 0)
menu_button->hide();
bottom_panel_btn->show();
}
@@ -413,9 +410,12 @@ GodotSharpEditor::GodotSharpEditor(EditorNode *p_editor) {
editor->add_child(memnew(MonoReloadNode));
menu_button = memnew(MenuButton);
menu_button->set_text(TTR("Mono"));
menu_popup = menu_button->get_popup();
menu_popup = memnew(PopupMenu);
menu_popup->hide();
menu_popup->set_as_toplevel(true);
menu_popup->set_pass_on_modal_close_click(false);
editor->add_tool_submenu_item("Mono", menu_popup);
// TODO: Remove or edit this info dialog once Mono support is no longer in alpha
{
@@ -478,10 +478,12 @@ GodotSharpEditor::GodotSharpEditor(EditorNode *p_editor) {
menu_popup->connect("id_pressed", this, "_menu_option_pressed");
if (menu_popup->get_item_count() == 0)
menu_button->hide();
editor->get_menu_hb()->add_child(menu_button);
ToolButton *build_button = memnew(ToolButton);
build_button->set_text("Build");
build_button->set_tooltip("Build solution");
build_button->set_focus_mode(Control::FOCUS_NONE);
build_button->connect("pressed", MonoBottomPanel::get_singleton(), "_build_project_pressed");
editor->get_menu_hb()->add_child(build_button);
// External editor settings
EditorSettings *ed_settings = EditorSettings::get_singleton();