From 8221e7546be7e260f59b716faf0094f43c0ade35 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 8 Feb 2024 00:08:07 +0100 Subject: Add editor shortcuts to toggle bottom panel visibility Default shortcuts use the first or second letter of each word. This also adds a new shortcut to toggle the last opened bottom panel. On editor startup, this defaults to the first panel in the list (which is the Output panel). --- modules/multiplayer/editor/multiplayer_editor_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/multiplayer/editor/multiplayer_editor_plugin.cpp') diff --git a/modules/multiplayer/editor/multiplayer_editor_plugin.cpp b/modules/multiplayer/editor/multiplayer_editor_plugin.cpp index e8dfc3379c..599926ec99 100644 --- a/modules/multiplayer/editor/multiplayer_editor_plugin.cpp +++ b/modules/multiplayer/editor/multiplayer_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "editor_network_profiler.h" #include "replication_editor.h" +#include "editor/editor_command_palette.h" #include "editor/editor_interface.h" #include "editor/editor_node.h" #include "editor/gui/editor_bottom_panel.h" @@ -113,7 +114,7 @@ void MultiplayerEditorDebugger::setup_session(int p_session_id) { MultiplayerEditorPlugin::MultiplayerEditorPlugin() { repl_editor = memnew(ReplicationEditor); - button = EditorNode::get_bottom_panel()->add_item(TTR("Replication"), repl_editor); + button = EditorNode::get_bottom_panel()->add_item(TTR("Replication"), repl_editor, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_replication_bottom_panel", TTR("Toggle Replication Bottom Panel"))); button->hide(); repl_editor->get_pin()->connect("pressed", callable_mp(this, &MultiplayerEditorPlugin::_pinned)); debugger.instantiate(); -- cgit v1.2.3