File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -171,15 +171,12 @@ void GuiMenu::openSoundSettings()
171
171
auto music_enabled = std::make_shared<SwitchComponent>(mWindow );
172
172
music_enabled->setState (Settings::getInstance ()->getBool (" EnableMusic" ));
173
173
s->addWithLabel (" BACKGROUND MUSIC" , music_enabled);
174
- s->addSaveFunc ([music_enabled]
175
- {
176
- if (Settings::getInstance ()->setBool (" EnableMusic" , music_enabled->getState ()))
177
- {
178
- if (music_enabled->getState ())
179
- AudioManager::getInstance ()->playRandomMusic ();
180
- else
181
- AudioManager::getInstance ()->stopMusic ();
182
- }
174
+ s->addSaveFunc ([music_enabled] {
175
+ Settings::getInstance ()->setBool (" EnableMusic" , music_enabled->getState ());
176
+ if (music_enabled->getState ())
177
+ AudioManager::getInstance ()->playRandomMusic ();
178
+ else
179
+ AudioManager::getInstance ()->stopMusic ();
183
180
});
184
181
185
182
auto video_audio = std::make_shared<SwitchComponent>(mWindow );
You can’t perform that action at this time.
0 commit comments