Feature: Allow base sounds set to be changed mid-game. (#12399)
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "network/network_survey.h"
|
||||
#include "video/video_driver.hpp"
|
||||
#include "social_integration.h"
|
||||
#include "sound_func.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -940,13 +941,7 @@ struct GameOptionsWindow : Window {
|
||||
break;
|
||||
|
||||
case WID_GO_BASE_SFX_DROPDOWN:
|
||||
if (_game_mode == GM_MENU) {
|
||||
auto set = BaseSounds::GetSet(index);
|
||||
BaseSounds::ini_set = set->name;
|
||||
BaseSounds::SetSet(set);
|
||||
this->reload = true;
|
||||
this->InvalidateData();
|
||||
}
|
||||
ChangeSoundSet(index);
|
||||
break;
|
||||
|
||||
case WID_GO_BASE_MUSIC_DROPDOWN:
|
||||
@@ -982,7 +977,6 @@ struct GameOptionsWindow : Window {
|
||||
#endif /* HAS_TRUETYPE_FONT */
|
||||
|
||||
this->SetWidgetDisabledState(WID_GO_BASE_GRF_DROPDOWN, _game_mode != GM_MENU);
|
||||
this->SetWidgetDisabledState(WID_GO_BASE_SFX_DROPDOWN, _game_mode != GM_MENU);
|
||||
|
||||
this->SetWidgetDisabledState(WID_GO_BASE_GRF_PARAMETERS, BaseGraphics::GetUsedSet() == nullptr || !BaseGraphics::GetUsedSet()->IsConfigurable());
|
||||
|
||||
|
Reference in New Issue
Block a user