* First commit * Lockers * Lockers electric boogaloo * Crates and Lockers * Almost finishing the Textures folder * Updating texture paths. Reminder to fix: * Lockers * Windows * Vending Machines * APC * Catwalks * Bedsheets and Cloaks * Status effects * dont know what happened here * Commit before merge * re-organizing * Lockers broken * Commit before merge * Submodule * renaming * Fixing most issues * forgot these ones * Updating submodule * typo * Fixing some paths * fixing some paths * updating submodule * (hopefully) fixing the submodule
94 lines
3.8 KiB
C#
94 lines
3.8 KiB
C#
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);
|
|
|
|
// Button styles.
|
|
var buttonNormal = new StyleBoxTexture(BaseButton)
|
|
{
|
|
Modulate = ButtonColorDefault
|
|
};
|
|
|
|
var buttonHover = new StyleBoxTexture(buttonNormal)
|
|
{
|
|
Modulate = ButtonColorHovered
|
|
};
|
|
|
|
var buttonPressed = new StyleBoxTexture(buttonNormal)
|
|
{
|
|
Modulate = ButtonColorPressed
|
|
};
|
|
|
|
var buttonDisabled = new StyleBoxTexture(buttonNormal)
|
|
{
|
|
Modulate = ButtonColorDisabled
|
|
};
|
|
|
|
|
|
Stylesheet = new Stylesheet(BaseRules.Concat(new StyleRule[]
|
|
{
|
|
Element<Label>().Class(StyleClassLabelHeading)
|
|
.Prop(Label.StylePropertyFont, notoSansBold16)
|
|
.Prop(Label.StylePropertyFontColor, SpaceRed),
|
|
|
|
Element<Label>().Class(StyleClassLabelSubText)
|
|
.Prop(Label.StylePropertyFont, notoSans10)
|
|
.Prop(Label.StylePropertyFontColor, Color.DarkGray),
|
|
|
|
Element<PanelContainer>().Class(ClassHighDivider)
|
|
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat
|
|
{
|
|
BackgroundColor = SpaceRed, ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2
|
|
}),
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
.Pseudo(ContainerButton.StylePseudoClassNormal)
|
|
.Prop(ContainerButton.StylePropertyStyleBox, buttonNormal),
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
.Pseudo(ContainerButton.StylePseudoClassHover)
|
|
.Prop(ContainerButton.StylePropertyStyleBox, buttonHover),
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
.Pseudo(ContainerButton.StylePseudoClassPressed)
|
|
.Prop(ContainerButton.StylePropertyStyleBox, buttonPressed),
|
|
|
|
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
|
|
.Pseudo(ContainerButton.StylePseudoClassDisabled)
|
|
.Prop(ContainerButton.StylePropertyStyleBox, buttonDisabled),
|
|
|
|
Element<Label>().Class(ContainerButton.StyleClassButton)
|
|
.Prop(Label.StylePropertyAlignMode, Label.AlignMode.Center),
|
|
|
|
Child()
|
|
.Parent(Element<Button>().Class(ContainerButton.StylePseudoClassDisabled))
|
|
.Child(Element<Label>())
|
|
.Prop("font-color", Color.FromHex("#E5E5E581")),
|
|
|
|
}).ToList());
|
|
}
|
|
}
|
|
}
|