Make the High Contrast option turn its resource pack on and off

This commit is contained in:
Kacpherek
2026-10-26 20:38:38 +01:00
parent e704a8dccb
commit 46b71954e1
+11
View File
@@ -2533,6 +2533,17 @@ impl OptionsUi {
if opt == Opt::Preset {
apply_preset(s);
}
if opt == Opt::HighContrast {
// Options.highContrast: the built-in pack follows the option.
let on = s.resource_packs.iter().any(|id| id == "high_contrast");
if on != s.high_contrast {
s.resource_packs.retain(|id| id != "high_contrast");
if s.high_contrast {
s.resource_packs.push("high_contrast".into());
}
events.push(Event::Packs(s.resource_packs.clone()));
}
}
events.push(Event::Changed);
}
Act::Extra(item) => {