1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Fix file menu for editor, restore menu order, add shortcut for quick saving

This commit is contained in:
Gymnasiast
2015-08-20 12:13:08 +02:00
parent c0ac3ba06d
commit 93d49e314e
7 changed files with 40 additions and 18 deletions

View File

@@ -500,6 +500,21 @@ static void shortcut_open_chat_window()
chat_toggle();
}
static void shortcut_quick_save_game()
{
log_error("quicksave");
// Do a quick save in playing mode and a regular save in Scenario Editor mode. In other cases, don't do anything.
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == SCREEN_FLAGS_PLAYING) {
log_error("quicksave2");
tool_cancel();
save_game();
}
else if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
rct_s6_info *s6Info = (rct_s6_info*)0x0141F570;
window_loadsave_open(LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE, s6Info->name);
}
}
static const shortcut_action shortcut_table[SHORTCUT_COUNT] = {
shortcut_close_top_most_window,
shortcut_close_all_floating_windows,
@@ -545,6 +560,7 @@ static const shortcut_action shortcut_table[SHORTCUT_COUNT] = {
NULL,
NULL,
shortcut_open_chat_window,
shortcut_quick_save_game,
};
#pragma endregion