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).
This commit is contained in:
parent
7d80635fce
commit
8221e7546b
24 changed files with 171 additions and 67 deletions
|
|
@ -338,6 +338,8 @@ void EditorNode::shortcut_input(const Ref<InputEvent> &p_event) {
|
|||
_editor_select_prev();
|
||||
} else if (ED_IS_SHORTCUT("editor/command_palette", p_event)) {
|
||||
_open_command_palette();
|
||||
} else if (ED_IS_SHORTCUT("editor/toggle_last_opened_bottom_panel", p_event)) {
|
||||
bottom_panel->toggle_last_opened_bottom_panel();
|
||||
} else {
|
||||
}
|
||||
|
||||
|
|
@ -6582,6 +6584,7 @@ EditorNode::EditorNode() {
|
|||
distraction_free->set_theme_type_variation("FlatMenuButton");
|
||||
ED_SHORTCUT_AND_COMMAND("editor/distraction_free_mode", TTR("Distraction Free Mode"), KeyModifierMask::CTRL | KeyModifierMask::SHIFT | Key::F11);
|
||||
ED_SHORTCUT_OVERRIDE("editor/distraction_free_mode", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::D);
|
||||
ED_SHORTCUT_AND_COMMAND("editor/toggle_last_opened_bottom_panel", TTR("Toggle Last Opened Bottom Panel"), KeyModifierMask::CMD_OR_CTRL | Key::J);
|
||||
distraction_free->set_shortcut(ED_GET_SHORTCUT("editor/distraction_free_mode"));
|
||||
distraction_free->set_tooltip_text(TTR("Toggle distraction-free mode."));
|
||||
distraction_free->set_toggle_mode(true);
|
||||
|
|
@ -6993,7 +6996,7 @@ EditorNode::EditorNode() {
|
|||
editor_dock_manager->add_control_to_dock(EditorDockManager::DOCK_SLOT_LEFT_UR, ImportDock::get_singleton(), TTR("Import"));
|
||||
|
||||
// FileSystem: Bottom left.
|
||||
editor_dock_manager->add_control_to_dock(EditorDockManager::DOCK_SLOT_LEFT_BR, FileSystemDock::get_singleton(), TTR("FileSystem"));
|
||||
editor_dock_manager->add_control_to_dock(EditorDockManager::DOCK_SLOT_LEFT_BR, FileSystemDock::get_singleton(), TTR("FileSystem"), ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_filesystem_bottom_panel", TTR("Toggle FileSystem Bottom Panel"), KeyModifierMask::ALT | Key::F));
|
||||
|
||||
// Inspector: Full height right.
|
||||
editor_dock_manager->add_control_to_dock(EditorDockManager::DOCK_SLOT_RIGHT_UL, InspectorDock::get_singleton(), TTR("Inspector"));
|
||||
|
|
@ -7035,7 +7038,7 @@ EditorNode::EditorNode() {
|
|||
center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
|
||||
|
||||
log = memnew(EditorLog);
|
||||
Button *output_button = bottom_panel->add_item(TTR("Output"), log);
|
||||
Button *output_button = bottom_panel->add_item(TTR("Output"), log, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_output_bottom_panel", TTR("Toggle Output Bottom Panel"), KeyModifierMask::ALT | Key::O));
|
||||
log->set_tool_button(output_button);
|
||||
|
||||
center_split->connect("resized", callable_mp(this, &EditorNode::_vp_resized));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue