mirror of https://github.com/OpenRCT2/OpenRCT2.git
Keyboard Shortcut for Scenery Remover - #5835
Added a hotkey for the "clear scenery" window. By default, the hotkey is the "b" key (b/c bulldozer).
This commit is contained in:
parent
0092fee1ce
commit
d0db59e196
|
@ -309,4 +309,5 @@ const uint16 KeyboardShortcuts::DefaultKeys[SHORTCUT_COUNT] =
|
|||
SDL_SCANCODE_KP_0, // SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT
|
||||
SDL_SCANCODE_KP_MINUS, // SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT
|
||||
PLATFORM_MODIFIER | SDL_SCANCODE_L, // SHORTCUT_LOAD_GAME
|
||||
SDL_SCANCODE_B, // SHORTCUT_CLEAR_SCENERY
|
||||
};
|
||||
|
|
|
@ -95,6 +95,7 @@ enum
|
|||
SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT,
|
||||
SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT,
|
||||
SHORTCUT_LOAD_GAME,
|
||||
SHORTCUT_CLEAR_SCENERY,
|
||||
|
||||
SHORTCUT_COUNT,
|
||||
|
||||
|
|
|
@ -495,6 +495,23 @@ static void shortcut_open_cheat_window()
|
|||
window_cheats_open();
|
||||
}
|
||||
|
||||
static void shortcut_clear_scenery()
|
||||
{
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gS6Info.editor_step == EDITOR_STEP_LANDSCAPE_EDITOR) {
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
|
||||
rct_window *window = window_find_by_class(WC_TOP_TOOLBAR);
|
||||
if (window != NULL) {
|
||||
window_invalidate(window);
|
||||
window_event_mouse_up_call(window, WC_TOP_TOOLBAR__WIDX_CLEAR_SCENERY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void shortcut_open_chat_window()
|
||||
{
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
|
@ -722,6 +739,7 @@ static const shortcut_action shortcut_table[SHORTCUT_COUNT] = {
|
|||
shortcut_ride_construction_build_current,
|
||||
shortcut_ride_construction_demolish_current,
|
||||
shortcut_load_game,
|
||||
shortcut_clear_scenery,
|
||||
};
|
||||
|
||||
#pragma endregion
|
||||
|
|
|
@ -150,6 +150,7 @@ const rct_string_id ShortcutStringIds[] = {
|
|||
STR_SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT,
|
||||
STR_SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT,
|
||||
STR_LOAD_GAME,
|
||||
STR_CLEAR_SCENERY,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -497,6 +497,7 @@ enum {
|
|||
#define WC_TOP_TOOLBAR__WIDX_WATER 9
|
||||
#define WC_TOP_TOOLBAR__WIDX_SCENERY 10
|
||||
#define WC_TOP_TOOLBAR__WIDX_PATH 11
|
||||
#define WC_TOP_TOOLBAR__WIDX_CLEAR_SCENERY 17
|
||||
#define WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT 23
|
||||
#define WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE 29
|
||||
#define WC_RIDE_CONSTRUCTION__WIDX_EXIT 30
|
||||
|
|
Loading…
Reference in New Issue