Merge pull request #9588 from kubecz3k/hide-script-btn
Ability to toggle script panel visibility
This commit is contained in:
commit
2c1e5f0699
2 changed files with 6 additions and 0 deletions
|
@ -876,6 +876,9 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||
bool debug_with_external_editor = !debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR));
|
||||
debugger->set_debug_with_external_editor(debug_with_external_editor);
|
||||
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR), debug_with_external_editor);
|
||||
} break;
|
||||
case TOGGLE_SCRIPTS_PANEL: {
|
||||
list_split->set_visible(!list_split->is_visible());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2235,6 +2238,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_docs", TTR("Close Docs")), CLOSE_DOCS);
|
||||
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_file", TTR("Close"), KEY_MASK_CMD | KEY_W), FILE_CLOSE);
|
||||
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_all", TTR("Close All")), CLOSE_ALL);
|
||||
file_menu->get_popup()->add_separator();
|
||||
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KEY_MASK_CMD | KEY_BACKSLASH), TOGGLE_SCRIPTS_PANEL);
|
||||
file_menu->get_popup()->connect("id_pressed", this, "_menu_option");
|
||||
|
||||
script_search_menu = memnew(MenuButton);
|
||||
|
|
|
@ -134,6 +134,7 @@ class ScriptEditor : public VBoxContainer {
|
|||
FILE_CLOSE,
|
||||
CLOSE_DOCS,
|
||||
CLOSE_ALL,
|
||||
TOGGLE_SCRIPTS_PANEL,
|
||||
FILE_TOOL_RELOAD,
|
||||
FILE_TOOL_RELOAD_SOFT,
|
||||
DEBUG_NEXT,
|
||||
|
|
Loading…
Reference in a new issue