From f3e9209af51a7f5eea0e4cf22698d63b18ebbe83 Mon Sep 17 00:00:00 2001
From: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
Date: Tue, 24 Sep 2024 20:30:19 +1000
Subject: [PATCH] Added CP14 options menu (#454)
---
Content.Client/Options/UI/OptionsMenu.xaml | 4 +++
Content.Client/Options/UI/OptionsMenu.xaml.cs | 4 +++
.../_CP14/Options/CP14OptionsMenuMainTab.xaml | 35 +++++++++++++++++++
.../Options/CP14OptionsMenuMainTab.xaml.cs | 19 ++++++++++
.../_CP14/Configuration/CP14ConfigVars.cs | 2 +-
.../_CP14/escape-menu/ui/options-menu.ftl | 8 +++++
.../_CP14/escape-menu/ui/options-menu.ftl | 8 +++++
7 files changed, 79 insertions(+), 1 deletion(-)
create mode 100644 Content.Client/_CP14/Options/CP14OptionsMenuMainTab.xaml
create mode 100644 Content.Client/_CP14/Options/CP14OptionsMenuMainTab.xaml.cs
create mode 100644 Resources/Locale/en-US/_CP14/escape-menu/ui/options-menu.ftl
create mode 100644 Resources/Locale/ru-RU/_CP14/escape-menu/ui/options-menu.ftl
diff --git a/Content.Client/Options/UI/OptionsMenu.xaml b/Content.Client/Options/UI/OptionsMenu.xaml
index 90486a196a..3c398d8590 100644
--- a/Content.Client/Options/UI/OptionsMenu.xaml
+++ b/Content.Client/Options/UI/OptionsMenu.xaml
@@ -1,5 +1,6 @@
@@ -8,5 +9,8 @@
+
+
+
diff --git a/Content.Client/Options/UI/OptionsMenu.xaml.cs b/Content.Client/Options/UI/OptionsMenu.xaml.cs
index b749d1f234..df9b1b2ca5 100644
--- a/Content.Client/Options/UI/OptionsMenu.xaml.cs
+++ b/Content.Client/Options/UI/OptionsMenu.xaml.cs
@@ -19,6 +19,10 @@ namespace Content.Client.Options.UI
Tabs.SetTabTitle(3, Loc.GetString("ui-options-tab-audio"));
Tabs.SetTabTitle(4, Loc.GetString("ui-options-tab-accessibility"));
+ // CP14-options-menu-start
+ Tabs.SetTabTitle(5, Loc.GetString("cp14-ui-options-tab-main"));
+ // CP14-options-menu-end
+
UpdateTabs();
}
diff --git a/Content.Client/_CP14/Options/CP14OptionsMenuMainTab.xaml b/Content.Client/_CP14/Options/CP14OptionsMenuMainTab.xaml
new file mode 100644
index 0000000000..597073e510
--- /dev/null
+++ b/Content.Client/_CP14/Options/CP14OptionsMenuMainTab.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Content.Client/_CP14/Options/CP14OptionsMenuMainTab.xaml.cs b/Content.Client/_CP14/Options/CP14OptionsMenuMainTab.xaml.cs
new file mode 100644
index 0000000000..97860323dc
--- /dev/null
+++ b/Content.Client/_CP14/Options/CP14OptionsMenuMainTab.xaml.cs
@@ -0,0 +1,19 @@
+using Content.Shared._CP14.Configuration;
+using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.XAML;
+
+namespace Content.Client._CP14.Options;
+
+[GenerateTypedNameReferences]
+public sealed partial class CP14OptionsMenuMainTab : Control
+{
+ public CP14OptionsMenuMainTab()
+ {
+ RobustXamlLoader.Load(this);
+
+ Control.AddOptionCheckBox(CP14ConfigVars.WaveShaderEnabled, WaveShaderEnabled);
+
+ Control.Initialize();
+ }
+}
diff --git a/Content.Shared/_CP14/Configuration/CP14ConfigVars.cs b/Content.Shared/_CP14/Configuration/CP14ConfigVars.cs
index 5d9204a66a..08be32ea3b 100644
--- a/Content.Shared/_CP14/Configuration/CP14ConfigVars.cs
+++ b/Content.Shared/_CP14/Configuration/CP14ConfigVars.cs
@@ -7,5 +7,5 @@ namespace Content.Shared._CP14.Configuration;
public sealed class CP14ConfigVars : CVars
{
public static readonly CVarDef
- WaveShaderEnabled = CVarDef.Create("cp14_rendering.wave_shader_enabled", true, CVar.CLIENT);
+ WaveShaderEnabled = CVarDef.Create("cp14_rendering.wave_shader_enabled", true, CVar.CLIENT | CVar.ARCHIVE);
}
diff --git a/Resources/Locale/en-US/_CP14/escape-menu/ui/options-menu.ftl b/Resources/Locale/en-US/_CP14/escape-menu/ui/options-menu.ftl
new file mode 100644
index 0000000000..15361673cc
--- /dev/null
+++ b/Resources/Locale/en-US/_CP14/escape-menu/ui/options-menu.ftl
@@ -0,0 +1,8 @@
+## General stuff
+
+cp14-ui-options-tab-main = CP14
+
+## Graphics
+
+cp14-ui-options-main-graphics-label = Graphics
+cp14-ui-options-main-graphics-wave-shader = Wave shader:
diff --git a/Resources/Locale/ru-RU/_CP14/escape-menu/ui/options-menu.ftl b/Resources/Locale/ru-RU/_CP14/escape-menu/ui/options-menu.ftl
new file mode 100644
index 0000000000..8f288f570b
--- /dev/null
+++ b/Resources/Locale/ru-RU/_CP14/escape-menu/ui/options-menu.ftl
@@ -0,0 +1,8 @@
+## General stuff
+
+cp14-ui-options-tab-main = CP14
+
+## Graphics
+
+cp14-ui-options-main-graphics-label = Графика
+cp14-ui-options-main-graphics-wave-shader = Шейдер покачивания (Wave shader):