diff --git a/src/config.c b/src/config.c index 3fdde76f90..75e9c1dde0 100644 --- a/src/config.c +++ b/src/config.c @@ -954,7 +954,8 @@ static const uint16 _defaultShortcutKeys[SHORTCUT_COUNT] = { // New SDL_SCANCODE_MINUS, // SHORTCUT_REDUCE_GAME_SPEED, SDL_SCANCODE_EQUALS, // SHORTCUT_INCREASE_GAME_SPEED, - 0x0200 | 0x0400 | SDL_SCANCODE_C // SHORTCUT_OPEN_CHEAT_WINDOW, + 0x0200 | 0x0400 | SDL_SCANCODE_C, // SHORTCUT_OPEN_CHEAT_WINDOW, + SDL_SCANCODE_T, // SHORTCUT_REMOVE_TOP_BOTTOM_TOOLBAR_TOGGLE, }; /** diff --git a/src/config.h b/src/config.h index 6f5a85b991..8c70b4b64b 100644 --- a/src/config.h +++ b/src/config.h @@ -70,6 +70,7 @@ enum { SHORTCUT_REDUCE_GAME_SPEED, SHORTCUT_INCREASE_GAME_SPEED, SHORTCUT_OPEN_CHEAT_WINDOW, + SHORTCUT_REMOVE_TOP_BOTTOM_TOOLBAR_TOGGLE, SHORTCUT_COUNT }; diff --git a/src/interface/keyboard_shortcut.c b/src/interface/keyboard_shortcut.c index c2e65483c2..be2e210dcc 100644 --- a/src/interface/keyboard_shortcut.c +++ b/src/interface/keyboard_shortcut.c @@ -228,6 +228,20 @@ static void shortcut_remove_vertical_land_toggle() toggle_view_flag(VIEWPORT_FLAG_HIDE_VERTICAL); } +static void shortcut_remove_top_bottom_toolbar_toggle() +{ + if (window_find_by_class(WC_TOP_TOOLBAR) != NULL) + { + window_close(window_find_by_class(WC_TOP_TOOLBAR)); + window_close(window_find_by_class(WC_BOTTOM_TOOLBAR)); + } + else + { + window_top_toolbar_open(); + window_game_bottom_toolbar_open(); + } +} + static void shortcut_see_through_rides_toggle() { toggle_view_flag(VIEWPORT_FLAG_SEETHROUGH_RIDES); @@ -484,9 +498,12 @@ static const shortcut_action shortcut_table[SHORTCUT_COUNT] = { shortcut_show_recent_messages, shortcut_show_map, shortcut_screenshot, + + //new shortcut_reduce_game_speed, shortcut_increase_game_speed, - shortcut_open_cheat_window + shortcut_open_cheat_window, + shortcut_remove_top_bottom_toolbar_toggle, }; #pragma endregion