using System.Linq; using Content.Client.Utility; using Robust.Client.Graphics.Drawing; using Robust.Client.Interfaces.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Shared.Maths; using static Robust.Client.UserInterface.StylesheetHelpers; namespace Content.Client.UserInterface.Stylesheets { public class StyleSpace : StyleBase { public static readonly Color SpaceRed = Color.FromHex("#9b2236"); public static readonly Color ButtonColorDefault = Color.FromHex("#464966"); public static readonly Color ButtonColorHovered = Color.FromHex("#575b7f"); public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45"); public static readonly Color ButtonColorDisabled = Color.FromHex("#30313c"); public override Stylesheet Stylesheet { get; } public StyleSpace(IResourceCache resCache) : base(resCache) { var notoSans10 = resCache.GetFont("/Textures/Interface/Nano/NotoSans/NotoSans-Regular.ttf", 10); var notoSansBold16 = resCache.GetFont("/Textures/Interface/Nano/NotoSans/NotoSans-Bold.ttf", 16); static (StyleBox, StyleBox, StyleBox, StyleBox) ButtonPermutations(StyleBoxTexture @base) { var normal = new StyleBoxTexture(@base) {Modulate = ButtonColorDefault}; var hover = new StyleBoxTexture(@base) {Modulate = ButtonColorHovered}; var pressed = new StyleBoxTexture(@base) {Modulate = ButtonColorPressed}; var disabled = new StyleBoxTexture(@base) {Modulate = ButtonColorDisabled}; return (normal, hover, pressed, disabled); } // Button styles. var (buttonNormal, buttonHover, buttonPressed, buttonDisabled) = ButtonPermutations(BaseButton); var (buttonRNormal, buttonRHover, buttonRPressed, buttonRDisabled) = ButtonPermutations(BaseButtonOpenRight); var (buttonLNormal, buttonLHover, buttonLPressed, buttonLDisabled) = ButtonPermutations(BaseButtonOpenLeft); var (buttonBNormal, buttonBHover, buttonBPressed, buttonBDisabled) = ButtonPermutations(BaseButtonOpenBoth); Stylesheet = new Stylesheet(BaseRules.Concat(new StyleRule[] { Element