Add the four missing options to the Chat page
This commit is contained in:
@@ -56,6 +56,7 @@ pub enum Opt {
|
||||
ChatVisibility,
|
||||
ChatColors,
|
||||
ChatLinks,
|
||||
ChatLinksPrompt,
|
||||
ChatOpacity,
|
||||
TextBackgroundOpacity,
|
||||
ChatScale,
|
||||
@@ -64,7 +65,10 @@ pub enum Opt {
|
||||
ChatHeightUnfocused,
|
||||
ChatLineSpacing,
|
||||
AutoSuggestions,
|
||||
HideMatchedNames,
|
||||
ReducedDebugInfo,
|
||||
OnlySecureChat,
|
||||
SaveChatDrafts,
|
||||
HighContrast,
|
||||
ShowSubtitles,
|
||||
MusicFrequency,
|
||||
@@ -167,6 +171,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::GlintSpeed
|
||||
| Opt::GlintStrength
|
||||
@@ -184,6 +193,10 @@ impl Opt {
|
||||
Opt::Narrator => "narrator",
|
||||
Opt::TextBackground => "backgroundForChatOnly",
|
||||
Opt::ChatDelay => "chatDelay",
|
||||
Opt::ChatLinksPrompt => "chatLinksPrompt",
|
||||
Opt::HideMatchedNames => "hideMatchedNames",
|
||||
Opt::OnlySecureChat => "onlyShowSecureChat",
|
||||
Opt::SaveChatDrafts => "saveChatDrafts",
|
||||
Opt::DistortionEffects => "screenEffectScale",
|
||||
Opt::FovEffects => "fovEffectScale",
|
||||
Opt::DarknessPulsing => "darknessEffectScale",
|
||||
@@ -243,6 +256,7 @@ impl Opt {
|
||||
Opt::ChatVisibility => "options.chat.visibility",
|
||||
Opt::ChatColors => "options.chat.color",
|
||||
Opt::ChatLinks => "options.chat.links",
|
||||
Opt::ChatLinksPrompt => "options.chat.links.prompt",
|
||||
Opt::ChatOpacity => "options.chat.opacity",
|
||||
Opt::TextBackgroundOpacity => "options.accessibility.text_background_opacity",
|
||||
Opt::ChatScale => "options.chat.scale",
|
||||
@@ -251,6 +265,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",
|
||||
@@ -524,6 +541,10 @@ 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::ChatLinksPrompt
|
||||
| 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")),
|
||||
@@ -718,7 +739,13 @@ impl Opt {
|
||||
value + 1
|
||||
};
|
||||
}
|
||||
Opt::TextBackground | Opt::HideLightningFlashes | Opt::HideSplashTexts => {
|
||||
Opt::TextBackground
|
||||
| Opt::HideLightningFlashes
|
||||
| Opt::HideSplashTexts
|
||||
| Opt::ChatLinksPrompt
|
||||
| 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)));
|
||||
@@ -1507,6 +1534,7 @@ impl OptionsUi {
|
||||
Opt::ChatVisibility,
|
||||
Opt::ChatColors,
|
||||
Opt::ChatLinks,
|
||||
Opt::ChatLinksPrompt,
|
||||
Opt::ChatOpacity,
|
||||
Opt::TextBackgroundOpacity,
|
||||
Opt::ChatScale,
|
||||
@@ -1515,7 +1543,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(
|
||||
|
||||
Reference in New Issue
Block a user