1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Merge pull request #1490 from MaikelS11/toggle-top-bottom-toolbar

Toggle top bottom toolbar
This commit is contained in:
Ted John
2015-06-28 13:41:16 +01:00
3 changed files with 21 additions and 2 deletions

View File

@@ -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,
};
/**

View File

@@ -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
};

View File

@@ -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