Implement load game shortcut

This commit is contained in:
wolfreak99 authored and Michał Janiszewski committed 2017-06-24 19:01:00 +02:00
1 parent c301e83a64
commit 8364d8d3d8
3 files changed
+10

No files matched your search

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