Gravity generator rewrite (#4828)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Pieter-Jan Briers
2021-11-02 01:12:55 +01:00
committed by GitHub
parent 0e33b246db
commit 059fa9ae48
17 changed files with 739 additions and 361 deletions

View File

@@ -54,6 +54,10 @@ namespace Content.Client.Stylesheets
public const string StyleClassPopupMessage = "PopupMessage";
public static readonly Color NanoGold = Color.FromHex("#A88B5E");
public static readonly Color GoodGreenFore = Color.FromHex("#31843E");
public static readonly Color ConcerningOrangeFore = Color.FromHex("#A5762F");
public static readonly Color DangerousRedFore = Color.FromHex("#BB3232");
public static readonly Color DisabledFore = Color.FromHex("#5A5A5A");
public static readonly Color ButtonColorDefault = Color.FromHex("#464966");
public static readonly Color ButtonColorDefaultRed = Color.FromHex("#D43B3B");
@@ -395,6 +399,15 @@ namespace Content.Client.Stylesheets
var sliderFillRed = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Red};
var sliderFillBlue = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Blue};
var boxFont13 = resCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 13);
var insetBack = new StyleBoxTexture
{
Texture = buttonTex,
Modulate = Color.FromHex("#202023"),
};
insetBack.SetPatchMargin(StyleBox.Margin.All, 10);
Stylesheet = new Stylesheet(BaseRules.Concat(new[]
{
// Window title.
@@ -1124,6 +1137,40 @@ namespace Content.Client.Stylesheets
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#25252A")),
Element<PanelContainer>().Class(ClassLowDivider)
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat
{
BackgroundColor = Color.FromHex("#444"),
ContentMarginLeftOverride = 2,
ContentMarginBottomOverride = 2
}),
Element<Label>().Class("FancyWindowTitle")
.Prop("font", boxFont13)
.Prop("font-color", NanoGold),
Element<PanelContainer>().Class("WindowHeadingBackground")
.Prop("panel", new StyleBoxTexture(BaseButtonOpenLeft) { Padding = default })
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#1F1F23")),
Element<PanelContainer>().Class("Inset")
.Prop("panel", insetBack),
Element<Label>().Class("StatusFieldTitle")
.Prop("font-color", NanoGold),
Element<Label>().Class("Good")
.Prop("font-color", GoodGreenFore),
Element<Label>().Class("Caution")
.Prop("font-color", ConcerningOrangeFore),
Element<Label>().Class("Danger")
.Prop("font-color", DangerousRedFore),
Element<Label>().Class("Disabled")
.Prop("font-color", DisabledFore),
}).ToList());
}
}