mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Migrate legacy UI colors and fix green button styling (#45889)
* migrate * update ReplayLoadingFailedControl * remove BOM
This commit is contained in:
parent
06ee56e042
commit
020112bf99
7 changed files with 24 additions and 24 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Content.Client.Stylesheets;
|
||||
using Content.Client.Stylesheets.Palette;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Atmos.Components;
|
||||
using Content.Shared.Atmos.EntitySystems;
|
||||
|
|
@ -135,7 +136,7 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
|
|||
{
|
||||
Text = Loc.GetString("atmos-alerts-window-other-gases-value-nil"),
|
||||
FontOverride = normalFont,
|
||||
FontColorOverride = StyleNano.DisabledFore,
|
||||
FontColorOverride = Palettes.Neutral.Base,
|
||||
HorizontalAlignment = HAlignment.Center,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
HorizontalExpand = true,
|
||||
|
|
@ -175,13 +176,13 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
|
|||
|
||||
public void SetAsFocus()
|
||||
{
|
||||
FocusButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
FocusButton.AddStyleClass(StyleClass.Positive);
|
||||
ArrowTexture.TexturePath = "/Textures/Interface/Nano/inverted_triangle.svg.png";
|
||||
}
|
||||
|
||||
public void RemoveAsFocus()
|
||||
{
|
||||
FocusButton.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
FocusButton.RemoveStyleClass(StyleClass.Positive);
|
||||
ArrowTexture.TexturePath = "/Textures/Interface/Nano/triangle_right.png";
|
||||
FocusContainer.Visible = false;
|
||||
}
|
||||
|
|
@ -191,13 +192,13 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
|
|||
switch (alarmType)
|
||||
{
|
||||
case AtmosAlarmType.Normal:
|
||||
return StyleNano.GoodGreenFore;
|
||||
return Palettes.Status.Good;
|
||||
case AtmosAlarmType.Warning:
|
||||
return StyleNano.ConcerningOrangeFore;
|
||||
return Palettes.Status.Warning;
|
||||
case AtmosAlarmType.Danger:
|
||||
return StyleNano.DangerousRedFore;
|
||||
return Palettes.Status.Critical;
|
||||
}
|
||||
|
||||
return StyleNano.DisabledFore;
|
||||
return Palettes.Neutral.Base;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using Content.Client.Message;
|
||||
using Content.Client.Pinpointer.UI;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.Stylesheets.Palette;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Shared.Atmos.Components;
|
||||
using Content.Shared.Atmos.Monitor;
|
||||
|
|
@ -49,8 +49,8 @@ public sealed partial class AtmosAlertsComputerWindow : FancyWindow
|
|||
private Color _monitorBlipColor = Color.Cyan;
|
||||
private Color _untrackedEntColor = Color.DimGray;
|
||||
private Color _regionBaseColor = new Color(154, 154, 154);
|
||||
private Color _inactiveColor = StyleNano.DisabledFore;
|
||||
private Color _statusTextColor = StyleNano.GoodGreenFore;
|
||||
private Color _inactiveColor = Palettes.Neutral.Base;
|
||||
private Color _statusTextColor = Palettes.Status.Good;
|
||||
private Color _goodColor = Color.LimeGreen;
|
||||
private Color _warningColor = new Color(255, 182, 72);
|
||||
private Color _dangerColor = new Color(255, 67, 67);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using Content.Client.Stylesheets;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Client.Stylesheets.Palette;
|
||||
using Content.Shared.Atmos.Components;
|
||||
using Content.Shared.Atmos.EntitySystems;
|
||||
using Content.Shared.FixedPoint;
|
||||
|
|
@ -96,15 +96,15 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer
|
|||
Loc.GetString("atmos-alerts-window-temperature-value", ("valueInC", tempC), ("valueInK", tempK)) :
|
||||
Loc.GetString("atmos-alerts-window-invalid-value");
|
||||
|
||||
TemperatureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore;
|
||||
TemperatureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base;
|
||||
|
||||
// Update pressure
|
||||
PressureLabel.Text = Loc.GetString("atmos-alerts-window-pressure-value", ("value", (FixedPoint2)updatedData.PressureData));
|
||||
PressureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore;
|
||||
PressureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base;
|
||||
|
||||
// Update total mol
|
||||
TotalMolLabel.Text = Loc.GetString("atmos-alerts-window-total-mol-value", ("value", (FixedPoint2)updatedData.TotalMolData));
|
||||
TotalMolLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore;
|
||||
TotalMolLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base;
|
||||
|
||||
// Update other present gases
|
||||
GasGridContainer.RemoveAllChildren();
|
||||
|
|
@ -116,7 +116,7 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer
|
|||
{
|
||||
Text = Loc.GetString("atmos-alerts-window-other-gases-value-nil"),
|
||||
FontOverride = normalFont,
|
||||
FontColorOverride = StyleNano.DisabledFore,
|
||||
FontColorOverride = Palettes.Neutral.Base,
|
||||
HorizontalAlignment = HAlignment.Center,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
HorizontalExpand = true,
|
||||
|
|
@ -155,14 +155,14 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer
|
|||
|
||||
public void SetAsFocus()
|
||||
{
|
||||
FocusButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
FocusButton.AddStyleClass(StyleClass.Positive);
|
||||
ArrowTexture.TexturePath = "/Textures/Interface/Nano/inverted_triangle.svg.png";
|
||||
FocusContainer.Visible = true;
|
||||
}
|
||||
|
||||
public void RemoveAsFocus()
|
||||
{
|
||||
FocusButton.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
|
||||
FocusButton.RemoveStyleClass(StyleClass.Positive);
|
||||
ArrowTexture.TexturePath = "/Textures/Interface/Nano/triangle_right.png";
|
||||
FocusContainer.Visible = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public sealed partial class HolopadWindow : FancyWindow
|
|||
RequestStationAiButton.OnPressed += args => { OnHolopadRequestStationAiMessage(); };
|
||||
|
||||
// XML formatting
|
||||
AnswerCallButton.AddStyleClass("ButtonAccept");
|
||||
AnswerCallButton.AddStyleClass(StyleClass.Positive);
|
||||
EndCallButton.AddStyleClass(StyleClass.Negative);
|
||||
StartBroadcastButton.AddStyleClass(StyleClass.Negative);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<controls:FancyWindow xmlns="https://spacestation14.io"
|
||||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
|
||||
xmlns:networkConfigurator="clr-namespace:Content.Client.NetworkConfigurator"
|
||||
Title="Network Configurator" MinSize="620 400" RectClipContent="True">
|
||||
<BoxContainer Orientation="Vertical" VerticalExpand="True">
|
||||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
|
||||
|
|
@ -29,7 +28,7 @@
|
|||
</BoxContainer>
|
||||
<Control HorizontalExpand="True"/>
|
||||
<Control>
|
||||
<Button Name="ButtonOk" MinHeight="26" StyleClasses="ButtonColorGreen" Text="{Loc signal-port-selector-menu-done}"></Button>
|
||||
<Button Name="ButtonOk" MinHeight="26" StyleClasses="positive" Text="{Loc signal-port-selector-menu-done}"></Button>
|
||||
</Control>
|
||||
</BoxContainer>
|
||||
<Control SetHeight="28" Margin="1 0 2 1">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Client.Stylesheets.Palette;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Shared.Power;
|
||||
using Content.Shared.Rounding;
|
||||
|
|
@ -29,10 +29,10 @@ public sealed partial class BatteryMenu : FancyWindow
|
|||
// Colors used for the storage cell bar graphic.
|
||||
private static readonly Color[] StorageColors =
|
||||
[
|
||||
StyleNano.DangerousRedFore,
|
||||
Palettes.Status.Critical,
|
||||
Color.FromHex("#C49438"),
|
||||
Color.FromHex("#B3BF28"),
|
||||
StyleNano.GoodGreenFore,
|
||||
Palettes.Status.Good
|
||||
];
|
||||
|
||||
// StorageColors but dimmed for "off" bars.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public sealed partial class ReplayLoadingFailedControl : Control
|
|||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
Stylesheet = stylesheet.SheetSpace;
|
||||
Stylesheet = stylesheet.SheetSystem;
|
||||
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue