Boe Character/Scenario Editor[OsX]: retrieve also PlaySound in the preferences...
This commit is contained in:
@@ -655,7 +655,7 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
void save_prefs(){
|
||||
bool success = sync_prefs();
|
||||
if(!success){
|
||||
showWarning("There was a problem writing to the preferences file. When the game is next run the preferences will revert to their previously set values.","Should you manage to resolve the problem without closing the program, simply open the preferences screen and click \"OK\" to try again.");
|
||||
showWarning("There was a problem writing to the preferences file. When the Scenerio Editor is next run the preferences will revert to their previously set values.","Should you manage to resolve the problem without closing the program, simply open the preferences screen and click \"OK\" to try again.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,6 +675,7 @@ bool prefs_event_filter (cDialog& me, std::string id, eKeyMod) {
|
||||
set_pref("UIScale", 1.0);
|
||||
else if(ui_scale.getState() == led_red)
|
||||
set_pref("UIScale", 2.0);
|
||||
set_pref("PlaySounds", dynamic_cast<cLed&>(me["nosound"]).getState() == led_off);
|
||||
}
|
||||
save_prefs();
|
||||
return true;
|
||||
@@ -688,6 +689,7 @@ void pick_preferences() {
|
||||
|
||||
float ui_scale = get_float_pref("UIScale", 1.0);
|
||||
dynamic_cast<cLed&>(prefsDlog["scaleui"]).setState(ui_scale == 1.0 ? led_off : (ui_scale == 2.0 ? led_red : led_green));
|
||||
dynamic_cast<cLed&>(prefsDlog["nosound"]).setState(get_bool_pref("PlaySounds", true) ? led_off : led_red);
|
||||
|
||||
prefsDlog.run();
|
||||
|
||||
|
Reference in New Issue
Block a user