diff --git a/Content.Client/Announcements/Systems/AnnouncerSystem.cs b/Content.Client/Announcements/Systems/AnnouncerSystem.cs index 2ce419b788..7b31a78107 100644 --- a/Content.Client/Announcements/Systems/AnnouncerSystem.cs +++ b/Content.Client/Announcements/Systems/AnnouncerSystem.cs @@ -30,7 +30,7 @@ public sealed class AnnouncerSystem : SharedAnnouncerSystem AnnouncerVolume = _config.GetCVar(CCVars.AnnouncerVolume) * 100f / ContentAudioSystem.AnnouncerMultiplier; _config.OnValueChanged(CCVars.AnnouncerVolume, OnAnnouncerVolumeChanged); - _config.OnValueChanged(CCVars.AnnouncerDisableMultipleSounds, OnAnnouncerDisableMultipleSounds); + _config.OnValueChanged(CCVars.AnnouncerDisableMultipleEnabled, OnAnnouncerDisableMultipleEnabled); SubscribeNetworkEvent(OnAnnouncementReceived); } @@ -40,7 +40,7 @@ public sealed class AnnouncerSystem : SharedAnnouncerSystem base.Shutdown(); _config.UnsubValueChanged(CCVars.AnnouncerVolume, OnAnnouncerVolumeChanged); - _config.UnsubValueChanged(CCVars.AnnouncerDisableMultipleSounds, OnAnnouncerDisableMultipleSounds); + _config.UnsubValueChanged(CCVars.AnnouncerDisableMultipleEnabled, OnAnnouncerDisableMultipleEnabled); } @@ -52,7 +52,7 @@ public sealed class AnnouncerSystem : SharedAnnouncerSystem source.Gain = AnnouncerVolume; } - private void OnAnnouncerDisableMultipleSounds(bool value) + private void OnAnnouncerDisableMultipleEnabled(bool value) { if (!value) return; @@ -79,7 +79,7 @@ public sealed class AnnouncerSystem : SharedAnnouncerSystem source.Gain = AnnouncerVolume * SharedAudioSystem.VolumeToGain(ev.AudioParams.Volume); source.Global = true; - if (_config.GetCVar(CCVars.AnnouncerDisableMultipleSounds)) + if (_config.GetCVar(CCVars.AnnouncerDisableMultipleEnabled)) { foreach (var audioSource in AnnouncerSources.ToList()) { diff --git a/Content.Client/CombatMode/CombatModeSystem.cs b/Content.Client/CombatMode/CombatModeSystem.cs index 2007c637e7..a5ae4bb38a 100644 --- a/Content.Client/CombatMode/CombatModeSystem.cs +++ b/Content.Client/CombatMode/CombatModeSystem.cs @@ -103,7 +103,7 @@ public sealed class CombatModeSystem : SharedCombatModeSystem UpdateHud(entity); // WD EDIT START - if (silent || !_cfg.GetCVar(WhiteCVars.ToggleCombatModeSound)) + if (silent || !_cfg.GetCVar(WhiteCVars.CombatModeSoundEnabled)) return; var soundToPlay = value diff --git a/Content.Client/Options/UI/OptionDropDown.xaml b/Content.Client/Options/UI/OptionDropDown.xaml new file mode 100644 index 0000000000..58dcdca6c8 --- /dev/null +++ b/Content.Client/Options/UI/OptionDropDown.xaml @@ -0,0 +1,6 @@ + + + + diff --git a/Content.Client/Options/UI/OptionDropDown.xaml.cs b/Content.Client/Options/UI/OptionDropDown.xaml.cs new file mode 100644 index 0000000000..506e241a06 --- /dev/null +++ b/Content.Client/Options/UI/OptionDropDown.xaml.cs @@ -0,0 +1,21 @@ +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface; + +namespace Content.Client.Options.UI; + +/// +/// Standard UI control used for drop-downs in the options menu. Intended for use with . +/// +/// +[GenerateTypedNameReferences] +public sealed partial class OptionDropDown : Control +{ + /// + /// The text describing what this drop-down controls. + /// + public string? Title + { + get => NameLabel.Text; + set => NameLabel.Text = value; + } +} diff --git a/Content.Client/Options/UI/OptionSlider.xaml b/Content.Client/Options/UI/OptionSlider.xaml new file mode 100644 index 0000000000..fa2d78c67f --- /dev/null +++ b/Content.Client/Options/UI/OptionSlider.xaml @@ -0,0 +1,7 @@ + + + + diff --git a/Content.Client/Options/UI/OptionSlider.xaml.cs b/Content.Client/Options/UI/OptionSlider.xaml.cs new file mode 100644 index 0000000000..6a377f7ee1 --- /dev/null +++ b/Content.Client/Options/UI/OptionSlider.xaml.cs @@ -0,0 +1,22 @@ +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface; + +namespace Content.Client.Options.UI; + +/// +/// Standard UI control used for sliders in the options menu. Intended for use with . +/// +/// +/// +[GenerateTypedNameReferences] +public sealed partial class OptionSlider : Control +{ + /// + /// The text describing what this slider controls. + /// + public string? Title + { + get => NameLabel.Text; + set => NameLabel.Text = value; + } +} diff --git a/Content.Client/Options/UI/OptionsMenu.xaml b/Content.Client/Options/UI/OptionsMenu.xaml index 4f624c1bb6..90486a196a 100644 --- a/Content.Client/Options/UI/OptionsMenu.xaml +++ b/Content.Client/Options/UI/OptionsMenu.xaml @@ -7,5 +7,6 @@ + diff --git a/Content.Client/Options/UI/OptionsMenu.xaml.cs b/Content.Client/Options/UI/OptionsMenu.xaml.cs index 94fc40c6ed..61037f4e4a 100644 --- a/Content.Client/Options/UI/OptionsMenu.xaml.cs +++ b/Content.Client/Options/UI/OptionsMenu.xaml.cs @@ -1,9 +1,7 @@ -using Content.Client.Options.UI.Tabs; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; - namespace Content.Client.Options.UI { [GenerateTypedNameReferences] @@ -18,13 +16,17 @@ namespace Content.Client.Options.UI Tabs.SetTabTitle(1, Loc.GetString("ui-options-tab-graphics")); Tabs.SetTabTitle(2, Loc.GetString("ui-options-tab-controls")); Tabs.SetTabTitle(3, Loc.GetString("ui-options-tab-audio")); + Tabs.SetTabTitle(4, Loc.GetString("ui-options-tab-accessibility")); UpdateTabs(); } public void UpdateTabs() { - GraphicsTab.UpdateProperties(); + GraphicsTab.Control.ReloadValues(); + MiscTab.Control.ReloadValues(); + AccessibilityTab.Control.ReloadValues(); + AudioTab.Control.ReloadValues(); } } } diff --git a/Content.Client/Options/UI/OptionsTabControlRow.xaml b/Content.Client/Options/UI/OptionsTabControlRow.xaml new file mode 100644 index 0000000000..fafdee4df7 --- /dev/null +++ b/Content.Client/Options/UI/OptionsTabControlRow.xaml @@ -0,0 +1,18 @@ + + + +