Implement a preference for this feature

This commit is contained in:
2025-01-18 19:09:20 -06:00
parent ed1d650450
commit dbe92c00b5
2 changed files with 3 additions and 0 deletions

View File

@@ -1185,6 +1185,7 @@ static bool prefs_event_filter (cDialog& me, std::string id, eKeyMod) {
else if(cur_display_mode == "br") set_pref("DisplayMode", 4);
else if(cur_display_mode == "win") set_pref("DisplayMode", 5);
set_pref("PlaySounds", dynamic_cast<cLed&>(me["nosound"]).getState() == led_off);
set_pref("DirectionalKeyScrolling", dynamic_cast<cLed&>(me["keyshift"]).getState() != led_off);
set_pref("RepeatRoomDescriptions", dynamic_cast<cLed&>(me["repeatdesc"]).getState() != led_off);
set_pref("ShowInstantHelp", dynamic_cast<cLed&>(me["nohelp"]).getState() == led_off);
@@ -1278,6 +1279,7 @@ void pick_preferences(bool record) {
}
dynamic_cast<cLed&>(prefsDlog["nosound"]).setState(get_bool_pref("PlaySounds", true) ? led_off : led_red);
dynamic_cast<cLed&>(prefsDlog["keyshift"]).setState(get_bool_pref("DirectionalKeyScrolling", true) ? led_red : led_off);
dynamic_cast<cLed&>(prefsDlog["repeatdesc"]).setState(get_bool_pref("RepeatRoomDescriptions") ? led_red : led_off);
dynamic_cast<cLed&>(prefsDlog["nohelp"]).setState(get_bool_pref("ShowInstantHelp", true) ? led_off : led_red);
if(overall_mode == MODE_STARTUP && !party_in_memory) {