diff --git a/Content.Client/UserInterface/NanoStyle.cs b/Content.Client/UserInterface/NanoStyle.cs
index 1dbd34fff6..da1ef41482 100644
--- a/Content.Client/UserInterface/NanoStyle.cs
+++ b/Content.Client/UserInterface/NanoStyle.cs
@@ -12,6 +12,10 @@ namespace Content.Client.UserInterface
{
public sealed class NanoStyle
{
+ public const string StyleClassSliderRed = "Red";
+ public const string StyleClassSliderGreen = "Green";
+ public const string StyleClassSliderBlue = "Blue";
+
public const string StyleClassLabelHeading = "LabelHeading";
public const string StyleClassLabelHeadingBigger = "LabelHeadingBigger";
public const string StyleClassLabelSubText = "LabelSubText";
@@ -205,6 +209,43 @@ namespace Content.Client.UserInterface
Mode = StyleBoxTexture.StretchMode.Tile
};
+ // Slider
+ var sliderOutlineTex = resCache.GetTexture("/Nano/slider_outline.svg.96dpi.png");
+ var sliderFillTex = resCache.GetTexture("/Nano/slider_fill.svg.96dpi.png");
+ var sliderGrabTex = resCache.GetTexture("/Nano/slider_grabber.svg.96dpi.png");
+
+ var sliderFillBox = new StyleBoxTexture
+ {
+ Texture = sliderFillTex,
+ Modulate = Color.FromHex("#3E6C45")
+ };
+
+ var sliderBackBox = new StyleBoxTexture
+ {
+ Texture = sliderFillTex,
+ Modulate = Color.FromHex("#1E1E22")
+ };
+
+ var sliderForeBox = new StyleBoxTexture
+ {
+ Texture = sliderOutlineTex,
+ Modulate = Color.FromHex("#494949")
+ };
+
+ var sliderGrabBox = new StyleBoxTexture
+ {
+ Texture = sliderGrabTex,
+ };
+
+ sliderFillBox.SetPatchMargin(StyleBox.Margin.All, 12);
+ sliderBackBox.SetPatchMargin(StyleBox.Margin.All, 12);
+ sliderForeBox.SetPatchMargin(StyleBox.Margin.All, 12);
+ sliderGrabBox.SetPatchMargin(StyleBox.Margin.All, 12);
+
+ var sliderFillGreen = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Green};
+ var sliderFillRed = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Red};
+ var sliderFillBlue = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Blue};
+
Stylesheet = new Stylesheet(new[]
{
// Default font.
@@ -620,6 +661,30 @@ namespace Content.Client.UserInterface
{
new StyleProperty("font", notoSans10),
}),
+
+ // Slider
+ new StyleRule(SelectorElement.Type(typeof(Slider)), new []
+ {
+ new StyleProperty(Slider.StylePropertyBackground, sliderBackBox),
+ new StyleProperty(Slider.StylePropertyForeground, sliderForeBox),
+ new StyleProperty(Slider.StylePropertyGrabber, sliderGrabBox),
+ new StyleProperty(Slider.StylePropertyFill, sliderFillBox),
+ }),
+
+ new StyleRule(new SelectorElement(typeof(Slider), new []{StyleClassSliderRed}, null, null), new []
+ {
+ new StyleProperty(Slider.StylePropertyFill, sliderFillRed),
+ }),
+
+ new StyleRule(new SelectorElement(typeof(Slider), new []{StyleClassSliderGreen}, null, null), new []
+ {
+ new StyleProperty(Slider.StylePropertyFill, sliderFillGreen),
+ }),
+
+ new StyleRule(new SelectorElement(typeof(Slider), new []{StyleClassSliderBlue}, null, null), new []
+ {
+ new StyleProperty(Slider.StylePropertyFill, sliderFillBlue),
+ })
});
}
}
diff --git a/Resources/Nano/slider_fill.svg b/Resources/Nano/slider_fill.svg
new file mode 100644
index 0000000000..c162e329bf
--- /dev/null
+++ b/Resources/Nano/slider_fill.svg
@@ -0,0 +1,92 @@
+
+
+
+
diff --git a/Resources/Nano/slider_fill.svg.96dpi.png b/Resources/Nano/slider_fill.svg.96dpi.png
new file mode 100644
index 0000000000..05a780078f
Binary files /dev/null and b/Resources/Nano/slider_fill.svg.96dpi.png differ
diff --git a/Resources/Nano/slider_grabber.svg b/Resources/Nano/slider_grabber.svg
new file mode 100644
index 0000000000..77eb03c29a
--- /dev/null
+++ b/Resources/Nano/slider_grabber.svg
@@ -0,0 +1,89 @@
+
+
+
+
diff --git a/Resources/Nano/slider_grabber.svg.96dpi.png b/Resources/Nano/slider_grabber.svg.96dpi.png
new file mode 100644
index 0000000000..557d1ca819
Binary files /dev/null and b/Resources/Nano/slider_grabber.svg.96dpi.png differ
diff --git a/Resources/Nano/slider_outline.svg b/Resources/Nano/slider_outline.svg
new file mode 100644
index 0000000000..bff5b507fb
--- /dev/null
+++ b/Resources/Nano/slider_outline.svg
@@ -0,0 +1,91 @@
+
+
+
+
diff --git a/Resources/Nano/slider_outline.svg.96dpi.png b/Resources/Nano/slider_outline.svg.96dpi.png
new file mode 100644
index 0000000000..de74c2dee0
Binary files /dev/null and b/Resources/Nano/slider_outline.svg.96dpi.png differ