Files
tbd-station-14/Content.Client/UserInterface/Stylesheets/StyleBase.cs
AJCM-git ae41d03ec6 Re-organizing the Resources folder. Part 1. (#1234)
* 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
2020-07-07 19:19:00 +02:00

48 lines
1.6 KiB
C#

using Content.Client.Utility;
using Robust.Client.Graphics.Drawing;
using Robust.Client.Interfaces.ResourceManagement;
using Robust.Client.UserInterface;
namespace Content.Client.UserInterface.Stylesheets
{
public abstract class StyleBase
{
public const string ClassHighDivider = "HighDivider";
public const string StyleClassLabelHeading = "LabelHeading";
public const string StyleClassLabelSubText = "LabelSubText";
public abstract Stylesheet Stylesheet { get; }
protected StyleRule[] BaseRules { get; }
protected StyleBoxTexture BaseButton { get; }
protected StyleBase(IResourceCache resCache)
{
var notoSans12 = resCache.GetFont("/Textures/Interface/Nano/NotoSans/NotoSans-Regular.ttf", 12);
// Button styles.
var buttonTex = resCache.GetTexture("/Textures/Interface/Nano/button.svg.96dpi.png");
BaseButton = new StyleBoxTexture
{
Texture = buttonTex,
};
BaseButton.SetPatchMargin(StyleBox.Margin.All, 10);
BaseButton.SetPadding(StyleBox.Margin.All, 1);
BaseButton.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
BaseButton.SetContentMarginOverride(StyleBox.Margin.Horizontal, 14);
BaseRules = new[]
{
// Default font.
new StyleRule(
new SelectorElement(null, null, null, null),
new[]
{
new StyleProperty("font", notoSans12),
}),
};
}
}
}