1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Implement load game shortcut

This commit is contained in:
wolfreak99
2017-06-18 13:32:12 -04:00
committed by Michał Janiszewski
parent c301e83a64
commit 8364d8d3d8
3 changed files with 10 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ enum
SHORTCUT_RIDE_CONSTRUCTION_NEXT_TRACK,
SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT,
SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT,
SHORTCUT_LOAD_GAME,
SHORTCUT_COUNT,

View File

@@ -649,6 +649,13 @@ static void shortcut_ride_construction_demolish_current()
window_ride_construction_keyboard_shortcut_demolish_current();
}
static void shortcut_load_game()
{
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) {
game_do_command(0, 1, 0, 0, GAME_COMMAND_LOAD_OR_QUIT, 0, 0);
}
}
static const shortcut_action shortcut_table[SHORTCUT_COUNT] = {
shortcut_close_top_most_window,
shortcut_close_all_floating_windows,
@@ -714,6 +721,7 @@ static const shortcut_action shortcut_table[SHORTCUT_COUNT] = {
shortcut_ride_construction_next_track,
shortcut_ride_construction_build_current,
shortcut_ride_construction_demolish_current,
shortcut_load_game,
};
#pragma endregion

View File

@@ -149,6 +149,7 @@ const rct_string_id ShortcutStringIds[] = {
STR_SHORTCUT_RIDE_CONSTRUCTION_NEXT_TRACK,
STR_SHORTCUT_RIDE_CONSTRUCTION_BUILD_CURRENT,
STR_SHORTCUT_RIDE_CONSTRUCTION_DEMOLISH_CURRENT,
STR_LOAD_GAME,
};
/**