Add shortcut for the Multiplayer window (#3509)

This commit is contained in:
Matte A 2016-05-06 22:14:49 +02:00 committed by Ted John
parent 2514ddfc01
commit 9421cc0bd4
5 changed files with 14 additions and 2 deletions

View File

@ -4117,6 +4117,7 @@ STR_5808 :{WINDOW_COLOUR_2}Number of shops and stalls: {BLACK}{COMMA16}
STR_5809 :{WINDOW_COLOUR_2}Number of information kiosks and other facilities: {BLACK}{COMMA16}
STR_5810 :Disable train length limit
STR_5811 :{SMALLFONT}{BLACK}If checked, you can have up to{NEWLINE}255 cars per train
STR_5812 :Show multiplayer window
#############
# Scenarios #

View File

@ -77,6 +77,7 @@ enum {
SHORTCUT_SHOW_OPTIONS,
SHORTCUT_MUTE_SOUND,
SHORTCUT_WINDOWED_MODE_TOGGLE,
SHORTCUT_SHOW_MULTIPLAYER,
SHORTCUT_COUNT
};

View File

@ -537,6 +537,12 @@ static void shortcut_windowed_mode_toggle()
platform_toggle_windowed_mode();
}
static void shortcut_show_multiplayer()
{
if (network_get_mode() != NETWORK_MODE_NONE)
window_multiplayer_open();
}
static const shortcut_action shortcut_table[SHORTCUT_COUNT] = {
shortcut_close_top_most_window,
shortcut_close_all_floating_windows,
@ -585,7 +591,8 @@ static const shortcut_action shortcut_table[SHORTCUT_COUNT] = {
shortcut_quick_save_game,
shortcut_show_options,
shortcut_mute_sound,
shortcut_windowed_mode_toggle
shortcut_windowed_mode_toggle,
shortcut_show_multiplayer,
};
#pragma endregion

View File

@ -2448,6 +2448,8 @@ enum {
STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT = 5810,
STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT_TIP = 5811,
STR_SHORTCUT_SHOW_MULTIPLAYER = 5812,
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
STR_COUNT = 32768

View File

@ -130,7 +130,8 @@ const rct_string_id ShortcutStringIds[] = {
STR_SHORTCUT_QUICK_SAVE_GAME,
STR_SHORTCUT_SHOW_OPTIONS,
STR_SHORTCUT_MUTE_SOUND,
STR_SHORTCUT_WINDOWED_MODE_TOGGLE
STR_SHORTCUT_WINDOWED_MODE_TOGGLE,
STR_SHORTCUT_SHOW_MULTIPLAYER,
};
/**