diff --git a/data/language/english_uk.txt b/data/language/english_uk.txt index cfa357f84e..798b040749 100644 --- a/data/language/english_uk.txt +++ b/data/language/english_uk.txt @@ -4109,6 +4109,8 @@ STR_5800 :{SMALLFONT}{BLACK}Prevents rides from breaking down STR_5801 :Disable littering STR_5802 :{SMALLFONT}{BLACK}Stops guests from littering and vomiting STR_5803 :{SMALLFONT}{BLACK}Rotate selected map element +STR_5804 :Mute sound + ############# # Scenarios # diff --git a/src/config.c b/src/config.c index 1a2387b9f3..060dd40855 100644 --- a/src/config.c +++ b/src/config.c @@ -1035,6 +1035,7 @@ static const uint16 _defaultShortcutKeys[SHORTCUT_COUNT] = { PLATFORM_MODIFIER | SDL_SCANCODE_F10, // SHORTCUT_QUICK_SAVE_GAME SHORTCUT_UNDEFINED, // SHORTCUT_SHOW_OPTIONS + SHORTCUT_UNDEFINED, // SHORTCUT_MUTE_SOUND }; #define SHORTCUT_FILE_VERSION 1 diff --git a/src/config.h b/src/config.h index e9890bece9..d2aeaae21e 100644 --- a/src/config.h +++ b/src/config.h @@ -79,6 +79,7 @@ enum { SHORTCUT_OPEN_CHAT_WINDOW, SHORTCUT_QUICK_SAVE_GAME, SHORTCUT_SHOW_OPTIONS, + SHORTCUT_MUTE_SOUND, SHORTCUT_COUNT }; diff --git a/src/interface/keyboard_shortcut.c b/src/interface/keyboard_shortcut.c index 90760d6aea..086d64a056 100644 --- a/src/interface/keyboard_shortcut.c +++ b/src/interface/keyboard_shortcut.c @@ -29,6 +29,7 @@ #include "viewport.h" #include "window.h" #include "widget.h" +#include "../audio/audio.h" typedef void (*shortcut_action)(); @@ -529,6 +530,11 @@ static void shortcut_show_options() window_options_open(); } +static void shortcut_mute_sound() +{ + audio_toggle_all_sounds(); +} + static const shortcut_action shortcut_table[SHORTCUT_COUNT] = { shortcut_close_top_most_window, shortcut_close_all_floating_windows, @@ -576,6 +582,7 @@ static const shortcut_action shortcut_table[SHORTCUT_COUNT] = { shortcut_open_chat_window, shortcut_quick_save_game, shortcut_show_options, + shortcut_mute_sound }; #pragma endregion diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index 60c5f15f17..5c60bcf33f 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -2440,6 +2440,8 @@ enum { STR_CHEAT_DISABLE_LITTERING = 5801, STR_CHEAT_DISABLE_LITTERING_TIP = 5802, + STR_SHORTCUT_MUTE_SOUND = 5804, + // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working STR_COUNT = 32768 }; diff --git a/src/windows/options.c b/src/windows/options.c index f750b502bd..ce48149264 100644 --- a/src/windows/options.c +++ b/src/windows/options.c @@ -636,7 +636,6 @@ static void window_options_mouseup(rct_window *w, int widgetIndex) case WINDOW_OPTIONS_PAGE_AUDIO: switch (widgetIndex) { case WIDX_SOUND_CHECKBOX: - // audio_toggle_all_sounds(); gConfigSound.sound_enabled = !gConfigSound.sound_enabled; config_save_default(); window_invalidate(w); diff --git a/src/windows/shortcut_keys.c b/src/windows/shortcut_keys.c index 9bea79ad9c..aef258e6a8 100644 --- a/src/windows/shortcut_keys.c +++ b/src/windows/shortcut_keys.c @@ -133,6 +133,7 @@ const rct_string_id ShortcutStringIds[] = { STR_SEND_MESSAGE, STR_SHORTCUT_QUICK_SAVE_GAME, STR_SHORTCUT_SHOW_OPTIONS, + STR_SHORTCUT_MUTE_SOUND }; /**