AHelp Tweaks 2 - Colored window header (#5337)

Co-authored-by: T <tomeno@lulzsec.co.uk>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Tomeno
2021-11-15 12:42:30 +01:00
committed by GitHub
parent 72b6d728a9
commit ff3f96e7c8
3 changed files with 28 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
<SS14Window
xmlns="https://spacestation14.io"
SetSize="400 200">
SetSize="400 200"
HeaderClass="windowHeaderAlert"
TitleClass="windowTitleAlert"
>
<BoxContainer Orientation="Vertical">
<OutputPanel Name="TextOutput" VerticalExpand="true" />
<HistoryLineEdit Name="SenderLineEdit" />

View File

@@ -130,6 +130,14 @@ namespace Content.Client.Stylesheets
ExpandMarginBottom = 3,
ContentMarginBottomOverride = 0
};
var windowHeaderAlertTex = resCache.GetTexture("/Textures/Interface/Nano/window_header_alert.png");
var windowHeaderAlert = new StyleBoxTexture
{
Texture = windowHeaderAlertTex,
PatchMarginBottom = 3,
ExpandMarginBottom = 3,
ContentMarginBottomOverride = 0
};
var windowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/window_background.png");
var windowBackground = new StyleBoxTexture
{
@@ -439,6 +447,14 @@ namespace Content.Client.Stylesheets
new StyleProperty(Label.StylePropertyFontColor, NanoGold),
new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14),
}),
// Alert (white) window title.
new StyleRule(
new SelectorElement(typeof(Label), new[] {"windowTitleAlert"}, null, null),
new[]
{
new StyleProperty(Label.StylePropertyFontColor, Color.White),
new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14),
}),
// Window background.
new StyleRule(
new SelectorElement(null, new[] {SS14Window.StyleClassWindowPanel}, null, null),
@@ -486,6 +502,13 @@ namespace Content.Client.Stylesheets
{
new StyleProperty(PanelContainer.StylePropertyPanel, windowHeader),
}),
// Alert (red) window header.
new StyleRule(
new SelectorElement(typeof(PanelContainer), new[] {"windowHeaderAlert"}, null, null),
new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, windowHeaderAlert),
}),
// Shapes for the buttons.
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B