Merge pull request #2670 from kacpherek/fix/chat-options-page

🤖 Agent: Merged main in (conflicts resolved, see the merge commit); proven in union R1b (branch union/cg19-r1b): clippy -D warnings, tests, the harnesses it can affect, lan_e2e in-frame and on the server thread.
This commit is contained in:
Ludovic Marie
2026-10-27 15:17:32 +01:00
committed by GitHub
2 changed files with 26 additions and 1 deletions
+23 -1
View File
@@ -81,6 +81,11 @@ impl Opt {
Opt::Narrator
| Opt::NarratorHotkey
| Opt::ChatDelay
// Stored, but there are no blocked players, signed chat or
// chat drafts yet.
| Opt::HideMatchedNames
| Opt::OnlySecureChat
| Opt::SaveChatDrafts
| Opt::DistortionEffects
| Opt::MonochromeLogo
| Opt::RotateWithMinecarts
@@ -96,6 +101,9 @@ impl Opt {
Opt::Narrator => "narrator",
Opt::TextBackground => "backgroundForChatOnly",
Opt::ChatDelay => "chatDelay",
Opt::HideMatchedNames => "hideMatchedNames",
Opt::OnlySecureChat => "onlyShowSecureChat",
Opt::SaveChatDrafts => "saveChatDrafts",
Opt::DistortionEffects => "screenEffectScale",
Opt::FovEffects => "fovEffectScale",
Opt::DarknessPulsing => "darknessEffectScale",
@@ -164,6 +172,9 @@ impl Opt {
Opt::ChatHeightUnfocused => "options.chat.height.unfocused",
Opt::ChatLineSpacing => "options.chat.line_spacing",
Opt::AutoSuggestions => "options.autoSuggestCommands",
Opt::HideMatchedNames => "options.hideMatchedNames",
Opt::OnlySecureChat => "options.onlyShowSecureChat",
Opt::SaveChatDrafts => "options.chat.drafts",
Opt::ReducedDebugInfo => "options.reducedDebugInfo",
Opt::HighContrast => "options.accessibility.high_contrast",
Opt::ShowSubtitles => "options.showSubtitles",
@@ -437,6 +448,9 @@ impl Opt {
Opt::HideLightningFlashes => on_off(s.file.bool("hideLightningFlashes")),
Opt::MonochromeLogo => on_off(s.file.bool("darkMojangStudiosBackground")),
Opt::HideSplashTexts => on_off(s.file.bool("hideSplashTexts")),
Opt::HideMatchedNames | Opt::OnlySecureChat | Opt::SaveChatDrafts => {
on_off(s.file.bool(self.file_key().unwrap()))
}
Opt::NarratorHotkey => on_off(s.file.bool("narratorHotkey")),
Opt::RotateWithMinecarts => on_off(s.file.bool("rotateWithMinecart")),
Opt::HighContrastBlockOutlines => on_off(s.file.bool("highContrastBlockOutline")),
@@ -635,7 +649,12 @@ impl Opt {
value + 1
};
}
Opt::TextBackground | Opt::HideLightningFlashes | Opt::HideSplashTexts => {
Opt::TextBackground
| Opt::HideLightningFlashes
| Opt::HideSplashTexts
| Opt::HideMatchedNames
| Opt::OnlySecureChat
| Opt::SaveChatDrafts => {
let key = self.file_key().unwrap();
s.file
.set(key, crate::options_file::V::Bool(!s.file.bool(key)));
@@ -1434,7 +1453,10 @@ impl OptionsUi {
Opt::ChatHeightFocused,
Opt::ChatHeightUnfocused,
Opt::AutoSuggestions,
Opt::HideMatchedNames,
Opt::ReducedDebugInfo,
Opt::OnlySecureChat,
Opt::SaveChatDrafts,
]),
Page::Accessibility => {
let mut rows = vec![Row::Buttons(
+3
View File
@@ -659,7 +659,10 @@ pub enum Opt {
ChatHeightUnfocused,
ChatLineSpacing,
AutoSuggestions,
HideMatchedNames,
ReducedDebugInfo,
OnlySecureChat,
SaveChatDrafts,
HighContrast,
ShowSubtitles,
MusicFrequency,