StyleNano removal: Palette system and Sheetlets (#29903)

* Apply patch 1777eea9a4..6b32bb2b14

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* make red squiggly line go away

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Add todo list

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Add palette to `TextureButton`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Rename `PalettedButtonSheetlet` to `NTButtonSheetlet` and move useful methods to `ButtonSheetlet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* migrate `ContextMenu` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* tweak NT colors

* New stylesheet: `InterfaceStylesheet` & `InterfaceTooltipSheetlet`

* Move inheritance of `IButtonConfig` to `NanotransenStylesheet.Buttons`

* move `MenuButtonSheetlet` & actually implement `InterfaceStylesheet` correctly

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* tweak color & update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* chat is this real (update chat palette)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `SmallButton` and remove some obsolete things from `StyleNano`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* rename `StyleClasses` to `StyleClass` so `Stylesheets.Redux.StyleClasses` syntax is dead

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* replace `ButtonColorGreen` with `Positive`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `Placeholder`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Examine popup buttons

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* move over more things & cleanup `StyleNano` more (under 1000 lines!!!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Remove some more redundant stuff

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Undo style change for chat window

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* paper editing works now

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `OptionButton` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `ListContainer`, move `DefaultWindow` styles (for now) & more cleanup

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* fix `ActionButton` not having highlighting

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* remove imports of `Robust.Client.UserInterface.StylesheetHelpers` & format

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `ButtonBig` and more cleanup

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Move items inheriting from `ISheetletConfig` into their own directory

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Cleanup & move `Label` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Action search box styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Moved, stuff is

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* rename `LabelSubtext` to `LabelSubText` & move more stuff (were almost there!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* yap & move over MORE stuff (just like one thing left!!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Change status classes to appropriate existing classes

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* remove remaining references to `StyleNano`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Fix some hardcoding & broken code, `GetFromControl`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Scrollbars!

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* chores

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* clean up `StyleClass.cs`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `ItemListSheetlet` refactor

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* more chores!

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Consistency w/ directory structure

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Move `MainMenuSheetlet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `ColorPalette`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* whoopsie

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Remove most sheet-specific sheetlets

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* fix warnings, cleanup, & fix scrollbar (this is why we fix warnings boys)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* yap

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* MASSIVE resharper skill issue

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* actually use `ISheetletConfig`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* have specific sheetlet be specific

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `GetResourceOr`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* cleanup & move / remove `IPalette`s

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* actually do specific stylesheets correctly & fix tooltips

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* cleanup & logging

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* Move `FontKind` and `FontKindExtensions` to their own files

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* rename `InterfaceStylesheet` to `SystemStylesheet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* change `ButtonHovered` etc to `PseudoHovered` etc

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* give the palettes fun names

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* `StyleSpace` is no more

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* It should compile now! I am now going to bed (fr) if it fails it fails

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* make squiggly red line go away

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* add additional type restrictions to sheetlets

* `CommonStylesheet`

* minor cleanup

* Make `GetSheetletRules` not horrible

* wait this was duplicating style rules. oops!

* move some sheetlets to their associated xamls

* oh wait apparently that was important

* review pass 1

* review pass 2 (font & color stuff)

* review pass 3: remove unused stuff / filename fix

* fix warnings & "replace cast with explicit variable type"

* move `Palette` stuff to its own directory

* tweak colors (they're different now that I actually fixed the OKlab thing)

* review pass 4: little things

* make window close button grey before hovering

* refactor `HLine` to make it less terrible and allow it to be styled

* fix `NanoHeading` (it's been broken for a while whoops) and cleanup hardcoding

* band-aid missing references in `StyleNano`

* move `StyleBox` generating functions out of `IButtonSheetlet` into `StyleBoxHelper`

* remove dictionary field from `IStylesheetManager`

* Add check for unloaded sheetlets

* style tweaks to satisfy OCD

* I somehow missed this: `Caution` styleclass replaced with `negative`, refactor `PowerChargeWindow`

* tweak palettes for like the fourth time

* construct `StyleNano` / `StyleSpace` in `StylesheetManager` and mark them as obsolete

* rename `BackgroundPanel` classes for consistency

* tweak window / `ListContainer`

* oh right you use `///` not `/**`

* font system is bad, make it temporary

* acknowledge Divider funkyness

* remove use of class `Disabled`

* `ColorPalette` allow overriding colors with brace initialization

* review pass again

* tweak disabled button colors

* `StatusPalette` tweaks

* typo

* Make squiggly red line go away

* Delete `Redux`

* Remove all references to `Redux`

* make red less radioactive

* Store stylesheet name inside stylesheet class

* fix merge errors

* use RT's Oklab support instead

* shuffle around `StylesheetManager` fields

* apply stylesheets based off `StylesheetComponent`

* simplify `ColorPalette` construction

* add todo for `SheetletConfigType`

* `OptionButton` has a background color now

* fix disabled buttons

* sigh (red color palette fixed)

* make `ItemList` use primary palette

* Revert "apply stylesheets based off `StylesheetComponent`"

This reverts commit c05b147da845f6e04ff33d1cbd91a18a92c676d7.

* dead code removal

* buttons are green when pressed (we need togglebuttons)

---------

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
This commit is contained in:
Brandon Li
2025-10-19 17:10:44 -04:00
committed by GitHub
parent edfa3d92f4
commit 545cacbcae
217 changed files with 3623 additions and 604 deletions

View File

@@ -9,6 +9,7 @@ using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using System.Numerics; using System.Numerics;
using System.Linq; using System.Linq;
using Content.Client.Stylesheets;
namespace Content.Client.Access.UI namespace Content.Client.Access.UI
{ {
@@ -49,12 +50,12 @@ namespace Content.Client.Access.UI
icons.Sort((x, y) => string.Compare(x.LocalizedJobName, y.LocalizedJobName, StringComparison.CurrentCulture)); icons.Sort((x, y) => string.Compare(x.LocalizedJobName, y.LocalizedJobName, StringComparison.CurrentCulture));
foreach (var jobIcon in icons) foreach (var jobIcon in icons)
{ {
String styleBase = StyleBase.ButtonOpenBoth; String styleBase = StyleClass.ButtonOpenBoth;
var modulo = i % JobIconColumnCount; var modulo = i % JobIconColumnCount;
if (modulo == 0) if (modulo == 0)
styleBase = StyleBase.ButtonOpenRight; styleBase = StyleClass.ButtonOpenRight;
else if (modulo == JobIconColumnCount - 1) else if (modulo == JobIconColumnCount - 1)
styleBase = StyleBase.ButtonOpenLeft; styleBase = StyleClass.ButtonOpenLeft;
// Generate buttons // Generate buttons
var jobIconButton = new Button var jobIconButton = new Button

View File

@@ -119,11 +119,11 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer
if (_groupedAccessLevels.Count > 1) if (_groupedAccessLevels.Count > 1)
{ {
if (AccessGroupList.ChildCount == 0) if (AccessGroupList.ChildCount == 0)
accessGroupButton.AddStyleClass(StyleBase.ButtonOpenLeft); accessGroupButton.AddStyleClass(StyleClass.ButtonOpenLeft);
else if (_groupedAccessLevels.Count > 1 && AccessGroupList.ChildCount == (_groupedAccessLevels.Count - 1)) else if (_groupedAccessLevels.Count > 1 && AccessGroupList.ChildCount == (_groupedAccessLevels.Count - 1))
accessGroupButton.AddStyleClass(StyleBase.ButtonOpenRight); accessGroupButton.AddStyleClass(StyleClass.ButtonOpenRight);
else else
accessGroupButton.AddStyleClass(StyleBase.ButtonOpenBoth); accessGroupButton.AddStyleClass(StyleClass.ButtonOpenBoth);
} }
accessGroupButton.Pressed = _accessGroupTabIndex == orderedAccessGroups.IndexOf(accessGroup); accessGroupButton.Pressed = _accessGroupTabIndex == orderedAccessGroups.IndexOf(accessGroup);

View File

@@ -23,9 +23,10 @@ namespace Content.Client.Actions.UI
public ActionAlertTooltip(FormattedMessage name, FormattedMessage? desc, string? requires = null) public ActionAlertTooltip(FormattedMessage name, FormattedMessage? desc, string? requires = null)
{ {
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSystem;
_gameTiming = IoCManager.Resolve<IGameTiming>(); _gameTiming = IoCManager.Resolve<IGameTiming>();
SetOnlyStyleClass(StyleNano.StyleClassTooltipPanel); SetOnlyStyleClass(StyleClass.TooltipPanel);
BoxContainer vbox; BoxContainer vbox;
AddChild(vbox = new BoxContainer AddChild(vbox = new BoxContainer
@@ -36,7 +37,7 @@ namespace Content.Client.Actions.UI
var nameLabel = new RichTextLabel var nameLabel = new RichTextLabel
{ {
MaxWidth = TooltipTextMaxWidth, MaxWidth = TooltipTextMaxWidth,
StyleClasses = {StyleNano.StyleClassTooltipActionTitle} StyleClasses = { StyleClass.TooltipTitle }
}; };
nameLabel.SetMessage(name); nameLabel.SetMessage(name);
vbox.AddChild(nameLabel); vbox.AddChild(nameLabel);
@@ -46,7 +47,7 @@ namespace Content.Client.Actions.UI
var description = new RichTextLabel var description = new RichTextLabel
{ {
MaxWidth = TooltipTextMaxWidth, MaxWidth = TooltipTextMaxWidth,
StyleClasses = {StyleNano.StyleClassTooltipActionDescription} StyleClasses = { StyleClass.TooltipDesc }
}; };
description.SetMessage(desc); description.SetMessage(desc);
vbox.AddChild(description); vbox.AddChild(description);
@@ -55,7 +56,7 @@ namespace Content.Client.Actions.UI
vbox.AddChild(_cooldownLabel = new RichTextLabel vbox.AddChild(_cooldownLabel = new RichTextLabel
{ {
MaxWidth = TooltipTextMaxWidth, MaxWidth = TooltipTextMaxWidth,
StyleClasses = {StyleNano.StyleClassTooltipActionCooldown}, StyleClasses = { StyleClass.TooltipDesc },
Visible = false Visible = false
}); });
@@ -64,7 +65,7 @@ namespace Content.Client.Actions.UI
var requiresLabel = new RichTextLabel var requiresLabel = new RichTextLabel
{ {
MaxWidth = TooltipTextMaxWidth, MaxWidth = TooltipTextMaxWidth,
StyleClasses = {StyleNano.StyleClassTooltipActionRequirements} StyleClasses = { StyleClass.TooltipDesc }
}; };
if (!FormattedMessage.TryFromMarkup("[color=#635c5c]" + requires + "[/color]", out var markup)) if (!FormattedMessage.TryFromMarkup("[color=#635c5c]" + requires + "[/color]", out var markup))

View File

@@ -7,7 +7,7 @@
</PanelContainer.PanelOverride> </PanelContainer.PanelOverride>
<Control HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="600"> <Control HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="600">
<PanelContainer StyleClasses="AngleRect" /> <PanelContainer StyleClasses="BackgroundPanel" />
<BoxContainer Orientation="Vertical" Margin="4"> <BoxContainer Orientation="Vertical" Margin="4">
<RichTextLabel Name="Description" /> <RichTextLabel Name="Description" />

View File

@@ -12,17 +12,19 @@ namespace Content.Client.Administration.UI.AdminRemarks;
[GenerateTypedNameReferences] [GenerateTypedNameReferences]
public sealed partial class AdminMessagePopupWindow : Control public sealed partial class AdminMessagePopupWindow : Control
{ {
[Dependency] private readonly IStylesheetManager _styleMan = default!;
private float _timer = float.MaxValue; private float _timer = float.MaxValue;
public event Action? OnDismissPressed; public event Action? OnDismissPressed;
public event Action? OnAcceptPressed; public event Action? OnAcceptPressed;
public AdminMessagePopupWindow() public AdminMessagePopupWindow()
{ {
RobustXamlLoader.Load(this); RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace; Stylesheet = _styleMan.SheetSystem;
AcceptButton.OnPressed += OnAcceptButtonPressed; AcceptButton.OnPressed += OnAcceptButtonPressed;
DismissButton.OnPressed += OnDismissButtonPressed; DismissButton.OnPressed += OnDismissButtonPressed;
@@ -49,7 +51,8 @@ public sealed partial class AdminMessagePopupWindow : Control
MessageContainer.AddChild(new AdminMessagePopupMessage(message)); MessageContainer.AddChild(new AdminMessagePopupMessage(message));
} }
Description.SetMessage(FormattedMessage.FromMarkupOrThrow(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length)))); Description.SetMessage(
FormattedMessage.FromMarkup(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
} }
private void OnDismissButtonPressed(BaseButton.ButtonEventArgs obj) private void OnDismissButtonPressed(BaseButton.ButtonEventArgs obj)

View File

@@ -27,7 +27,7 @@ namespace Content.Client.Administration.UI
[Dependency] private readonly IClientAdminManager _adminManager = default!; [Dependency] private readonly IClientAdminManager _adminManager = default!;
private readonly Menu _menu; private readonly Menu _menu;
private readonly List<DefaultWindow> _subWindows = new(); private readonly List<BaseWindow> _subWindows = new();
private Dictionary<int, PermissionsEuiState.AdminRankData> _ranks = private Dictionary<int, PermissionsEuiState.AdminRankData> _ranks =
new(); new();
@@ -216,7 +216,7 @@ namespace Content.Client.Administration.UI
var titleControl = new Label { Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant() }; var titleControl = new Label { Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant() };
if (admin.Title == null) // none if (admin.Title == null) // none
{ {
titleControl.StyleClasses.Add(StyleBase.StyleClassItalic); titleControl.StyleClasses.Add(StyleClass.Italic);
} }
al.AddChild(titleControl); al.AddChild(titleControl);
@@ -240,7 +240,7 @@ namespace Content.Client.Administration.UI
var rankControl = new Label { Text = rank }; var rankControl = new Label { Text = rank };
if (italic) if (italic)
{ {
rankControl.StyleClasses.Add(StyleBase.StyleClassItalic); rankControl.StyleClasses.Add(StyleClass.Italic);
} }
al.AddChild(rankControl); al.AddChild(rankControl);
@@ -340,10 +340,9 @@ namespace Content.Client.Administration.UI
tab.AddChild(adminVBox); tab.AddChild(adminVBox);
tab.AddChild(rankVBox); tab.AddChild(rankVBox);
Contents.AddChild(tab); ContentsContainer.AddChild(tab);
ContentsContainer.MinSize = new(600, 400);
} }
protected override Vector2 ContentsMinimumSize => new Vector2(600, 400);
} }
private sealed class EditAdminWindow : DefaultWindow private sealed class EditAdminWindow : DefaultWindow
@@ -419,21 +418,21 @@ namespace Content.Client.Administration.UI
var inherit = new Button var inherit = new Button
{ {
Text = "I", Text = "I",
StyleClasses = { StyleBase.ButtonOpenRight }, StyleClasses = { StyleClass.ButtonOpenRight },
Disabled = disable, Disabled = disable,
Group = group, Group = group,
}; };
var sub = new Button var sub = new Button
{ {
Text = "-", Text = "-",
StyleClasses = { StyleBase.ButtonOpenBoth }, StyleClasses = { StyleClass.ButtonOpenBoth },
Disabled = disable, Disabled = disable,
Group = group Group = group
}; };
var plus = new Button var plus = new Button
{ {
Text = "+", Text = "+",
StyleClasses = { StyleBase.ButtonOpenLeft }, StyleClasses = { StyleClass.ButtonOpenLeft },
Disabled = disable, Disabled = disable,
Group = group Group = group
}; };
@@ -479,7 +478,7 @@ namespace Content.Client.Administration.UI
bottomButtons.AddChild(SaveButton); bottomButtons.AddChild(SaveButton);
Contents.AddChild(new BoxContainer ContentsContainer.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical, Orientation = LayoutOrientation.Vertical,
Children = Children =
@@ -605,7 +604,7 @@ namespace Content.Client.Administration.UI
bottomButtons.AddChild(SaveButton); bottomButtons.AddChild(SaveButton);
Contents.AddChild(new BoxContainer ContentsContainer.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical, Orientation = LayoutOrientation.Vertical,
Children = Children =

View File

@@ -14,7 +14,7 @@
VerticalExpand="True" VerticalExpand="True"
Margin="0 0 0 0" Margin="0 0 0 0"
VerticalAlignment="Center"> VerticalAlignment="Center">
<Label Text="{Loc 'anomaly-generator-fuel-display'}" StyleClasses="StatusFieldTitle" /> <Label Text="{Loc 'anomaly-generator-fuel-display'}" StyleClasses="highlight" />
<ProgressBar Name="FuelBar" <ProgressBar Name="FuelBar"
HorizontalExpand="True" HorizontalExpand="True"
MaxValue="1" MaxValue="1"
@@ -27,8 +27,8 @@
Text="0 %" /> Text="0 %" />
</ProgressBar> </ProgressBar>
</BoxContainer> </BoxContainer>
<RichTextLabel Name="CooldownLabel" StyleClasses="StatusFieldTitle" /> <RichTextLabel Name="CooldownLabel" StyleClasses="highlight" />
<RichTextLabel Name="ReadyLabel" StyleClasses="StatusFieldTitle" /> <RichTextLabel Name="ReadyLabel" StyleClasses="highlight" />
</BoxContainer> </BoxContainer>
<!--Sprite View--> <!--Sprite View-->
<PanelContainer Margin="12 0 0 0" <PanelContainer Margin="12 0 0 0"

View File

@@ -338,7 +338,7 @@ namespace Content.Client.Arcade
menuInnerPanel.AddChild(menuContainer); menuInnerPanel.AddChild(menuContainer);
#endregion #endregion
Contents.AddChild(_mainPanel); ContentsContainer.AddChild(_mainPanel);
CanKeyboardFocus = true; CanKeyboardFocus = true;
} }

View File

@@ -86,7 +86,7 @@ namespace Content.Client.Arcade
newGame.OnPressed += _ => OnPlayerAction?.Invoke(SharedSpaceVillainArcadeComponent.PlayerAction.NewGame); newGame.OnPressed += _ => OnPlayerAction?.Invoke(SharedSpaceVillainArcadeComponent.PlayerAction.NewGame);
grid.AddChild(newGame); grid.AddChild(newGame);
Contents.AddChild(grid); ContentsContainer.AddChild(grid);
} }
private void UpdateMetadata(SharedSpaceVillainArcadeComponent.SpaceVillainArcadeMetaDataUpdateMessage message) private void UpdateMetadata(SharedSpaceVillainArcadeComponent.SpaceVillainArcadeMetaDataUpdateMessage message)

View File

@@ -1,6 +1,6 @@
using Content.Client.Atmos.Monitor.UI.Widgets; using Content.Client.Atmos.Monitor.UI.Widgets;
using Content.Client.Message; using Content.Client.Message;
using Content.Client.Stylesheets; using Content.Client.Stylesheets.Palette;
using Content.Client.UserInterface.Controls; using Content.Client.UserInterface.Controls;
using Content.Shared.Atmos; using Content.Shared.Atmos;
using Content.Shared.Atmos.Monitor; using Content.Shared.Atmos.Monitor;
@@ -17,7 +17,7 @@ namespace Content.Client.Atmos.Monitor.UI;
public sealed partial class AirAlarmWindow : FancyWindow public sealed partial class AirAlarmWindow : FancyWindow
{ {
public event Action<string, IAtmosDeviceData>? AtmosDeviceDataChanged; public event Action<string, IAtmosDeviceData>? AtmosDeviceDataChanged;
public event Action<IAtmosDeviceData>? AtmosDeviceDataCopied; public event Action<IAtmosDeviceData>? AtmosDeviceDataCopied;
public event Action<string, AtmosMonitorThresholdType, AtmosAlarmThreshold, Gas?>? AtmosAlarmThresholdChanged; public event Action<string, AtmosMonitorThresholdType, AtmosAlarmThreshold, Gas?>? AtmosAlarmThresholdChanged;
public event Action<AirAlarmMode>? AirAlarmModeChanged; public event Action<AirAlarmMode>? AirAlarmModeChanged;
public event Action<bool>? AutoModeChanged; public event Action<bool>? AutoModeChanged;
@@ -131,7 +131,7 @@ public sealed partial class AirAlarmWindow : FancyWindow
case GasVentPumpData pump: case GasVentPumpData pump:
if (!_pumps.TryGetValue(addr, out var pumpControl)) if (!_pumps.TryGetValue(addr, out var pumpControl))
{ {
var control= new PumpControl(pump, addr); var control = new PumpControl(pump, addr);
control.PumpDataChanged += AtmosDeviceDataChanged; control.PumpDataChanged += AtmosDeviceDataChanged;
control.PumpDataCopied += AtmosDeviceDataCopied; control.PumpDataCopied += AtmosDeviceDataCopied;
_pumps.Add(addr, control); _pumps.Add(addr, control);
@@ -186,11 +186,9 @@ public sealed partial class AirAlarmWindow : FancyWindow
{ {
return curAlarm switch return curAlarm switch
{ {
AtmosAlarmType.Danger => StyleNano.DangerousRedFore, AtmosAlarmType.Danger => Palettes.Status.Critical,
AtmosAlarmType.Warning => StyleNano.ConcerningOrangeFore, AtmosAlarmType.Warning => Palettes.Status.Warning,
_ => StyleNano.GoodGreenFore, _ => Palettes.Status.Good,
}; };
} }
} }

View File

@@ -1,3 +1,4 @@
using Content.Client.Stylesheets;
using Content.Shared.Atmos.Monitor; using Content.Shared.Atmos.Monitor;
using Robust.Client.AutoGenerated; using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;
@@ -42,11 +43,11 @@ public sealed partial class ThresholdBoundControl : BoxContainer
if (enabled) if (enabled)
{ {
CBoundLabel.RemoveStyleClass("Disabled"); CBoundLabel.RemoveStyleClass(StyleClass.LabelWeak);
} }
else else
{ {
CBoundLabel.SetOnlyStyleClass("Disabled"); CBoundLabel.SetOnlyStyleClass(StyleClass.LabelWeak);
} }
} }

View File

@@ -4,7 +4,7 @@
MinSize="480 400" Title="Canister"> MinSize="480 400" Title="Canister">
<BoxContainer Orientation="Vertical" Margin="5 5 5 5" SeparationOverride="10"> <BoxContainer Orientation="Vertical" Margin="5 5 5 5" SeparationOverride="10">
<BoxContainer Orientation="Vertical" VerticalExpand="True"> <BoxContainer Orientation="Vertical" VerticalExpand="True">
<Label Text="{Loc comp-gas-canister-ui-canister-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/> <Label Text="{Loc comp-gas-canister-ui-canister-status}" StyleClasses="LabelHeading"/>
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc comp-gas-canister-ui-canister-pressure}"/> <Label Text="{Loc comp-gas-canister-ui-canister-pressure}"/>
<Label Name="CanisterPressureLabel" Align="Center" HorizontalExpand="True"/> <Label Name="CanisterPressureLabel" Align="Center" HorizontalExpand="True"/>
@@ -16,7 +16,7 @@
</BoxContainer> </BoxContainer>
<BoxContainer Orientation="Vertical" VerticalExpand="True"> <BoxContainer Orientation="Vertical" VerticalExpand="True">
<Label Text="{Loc comp-gas-canister-ui-holding-tank-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/> <Label Text="{Loc comp-gas-canister-ui-holding-tank-status}" StyleClasses="LabelHeading"/>
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc comp-gas-canister-ui-holding-tank-label}"/> <Label Text="{Loc comp-gas-canister-ui-holding-tank-label}"/>
<Label Name="TankLabelLabel" Text="{Loc comp-gas-canister-ui-holding-tank-label-empty}" Align="Center" HorizontalExpand="True"/> <Label Name="TankLabelLabel" Text="{Loc comp-gas-canister-ui-holding-tank-label-empty}" Align="Center" HorizontalExpand="True"/>
@@ -29,7 +29,7 @@
</BoxContainer> </BoxContainer>
<BoxContainer Orientation="Vertical" VerticalExpand="True"> <BoxContainer Orientation="Vertical" VerticalExpand="True">
<Label Text="{Loc comp-gas-canister-ui-release-valve-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/> <Label Text="{Loc comp-gas-canister-ui-release-valve-status}" StyleClasses="LabelHeading"/>
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">
<BoxContainer Orientation="Vertical"> <BoxContainer Orientation="Vertical">
<Label Text="{Loc comp-gas-canister-ui-release-pressure}"/> <Label Text="{Loc comp-gas-canister-ui-release-pressure}"/>

View File

@@ -7,10 +7,7 @@
Orientation="Vertical" Orientation="Vertical"
HorizontalExpand="True" HorizontalExpand="True"
Margin="0 0 0 5"> Margin="0 0 0 5">
<PanelContainer> <PanelContainer StyleClasses="PanelDark">
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BackgroundColor="{xNamespace:Static style:StyleNano.ButtonColorDisabled}" />
</PanelContainer.PanelOverride>
<Collapsible Name="Collapsible"> <Collapsible Name="Collapsible">
<CollapsibleHeading Name="Heading" MinHeight="35"/> <CollapsibleHeading Name="Heading" MinHeight="35"/>
<CollapsibleBody Name="Body"> <CollapsibleBody Name="Body">

View File

@@ -14,10 +14,8 @@
<PanelContainer <PanelContainer
VerticalExpand="True" VerticalExpand="True"
HorizontalExpand="True" HorizontalExpand="True"
Margin="15"> Margin="15"
<PanelContainer.PanelOverride> StyleClasses="PanelDark">
<graphics:StyleBoxFlat BackgroundColor="{xNamespace:Static style:StyleNano.PanelDark}" />
</PanelContainer.PanelOverride>
<ScrollContainer VerticalExpand="True" HorizontalExpand="True"> <ScrollContainer VerticalExpand="True" HorizontalExpand="True">
<Control> <Control>
<Label Text="{Loc 'cryostorage-ui-label-no-bodies'}" Name="EmptyLabel" HorizontalAlignment="Center" VerticalAlignment="Center"/> <Label Text="{Loc 'cryostorage-ui-label-no-bodies'}" Name="EmptyLabel" HorizontalAlignment="Center" VerticalAlignment="Center"/>

View File

@@ -1,7 +1,7 @@
<DefaultWindow <DefaultWindow
xmlns="https://spacestation14.io" xmlns="https://spacestation14.io"
Title="{Loc 'ui-bql-results-title'}"> Title="{Loc 'ui-bql-results-title'}">
<BoxContainer Orientation="Vertical"> <BoxContainer Orientation="Vertical" MinSize="500 700">
<Label Name="StatusLabel" /> <Label Name="StatusLabel" />
<ScrollContainer VerticalExpand="True"> <ScrollContainer VerticalExpand="True">
<BoxContainer Orientation="Vertical" Name="ItemList" VerticalExpand="True" /> <BoxContainer Orientation="Vertical" Name="ItemList" VerticalExpand="True" />

View File

@@ -21,8 +21,6 @@ internal sealed partial class ToolshedVisualizeWindow : DefaultWindow
RobustXamlLoader.Load(this); RobustXamlLoader.Load(this);
} }
protected override Vector2 ContentsMinimumSize => new(500, 700);
public void Update((string name, NetEntity entity)[] entities) public void Update((string name, NetEntity entity)[] entities)
{ {
StatusLabel.Text = _loc.GetString("ui-bql-results-status", ("count", entities.Length)); StatusLabel.Text = _loc.GetString("ui-bql-results-status", ("count", entities.Length));

View File

@@ -3,7 +3,7 @@
Margin="10 10 10 0" Margin="10 10 10 0"
HorizontalExpand="True" HorizontalExpand="True"
Visible="True"> Visible="True">
<PanelContainer StyleClasses="AngleRect" HorizontalExpand="True"> <PanelContainer StyleClasses="BackgroundPanel" HorizontalExpand="True">
<BoxContainer Orientation="Vertical" <BoxContainer Orientation="Vertical"
HorizontalExpand="True"> HorizontalExpand="True">
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">

View File

@@ -36,12 +36,12 @@ namespace Content.Client.Changelog
if (_changelogManager.NewChangelogEntries) if (_changelogManager.NewChangelogEntries)
{ {
Text = Loc.GetString("changelog-button-new-entries"); Text = Loc.GetString("changelog-button-new-entries");
StyleClasses.Add(StyleBase.ButtonCaution); StyleClasses.Add(StyleClass.Negative);
} }
else else
{ {
Text = Loc.GetString("changelog-button"); Text = Loc.GetString("changelog-button");
StyleClasses.Remove(StyleBase.ButtonCaution); StyleClasses.Remove(StyleClass.Negative);
} }
} }
} }

View File

@@ -58,7 +58,7 @@ public sealed partial class ChangelogTab : Control
ChangelogBody.AddChild(new Label ChangelogBody.AddChild(new Label
{ {
Text = dayNice, Text = dayNice,
StyleClasses = { StyleBase.StyleClassLabelHeading }, StyleClasses = { StyleClass.LabelHeading },
Margin = new Thickness(4, 6, 0, 0) Margin = new Thickness(4, 6, 0, 0)
}); });
@@ -117,7 +117,7 @@ public sealed partial class ChangelogTab : Control
}; };
readDivider.AddChild(hBox); readDivider.AddChild(hBox);
readDivider.AddChild(new PanelContainer { StyleClasses = { StyleBase.ClassLowDivider } }); readDivider.AddChild(new PanelContainer { StyleClasses = { StyleClass.LowDivider } });
ChangelogBody.AddChild(readDivider); ChangelogBody.AddChild(readDivider);
if (first) if (first)

View File

@@ -2,8 +2,9 @@
xmlns:ui="clr-namespace:Content.Client.Changelog" xmlns:ui="clr-namespace:Content.Client.Changelog"
Title="{Loc 'changelog-window-title'}" Title="{Loc 'changelog-window-title'}"
MinSize="500 400" MinSize="500 400"
SetSize="500 400"> SetSize="500 400"
<PanelContainer StyleClasses="AngleRect" /> Stylesheet="Interface">
<PanelContainer StyleClasses="BackgroundPanel" />
<BoxContainer Orientation="Vertical"> <BoxContainer Orientation="Vertical">
<TabContainer Name="Tabs" Access="Public" HorizontalExpand="True" VerticalExpand="True" /> <TabContainer Name="Tabs" Access="Public" HorizontalExpand="True" VerticalExpand="True" />
<PanelContainer StyleClasses="LowDivider" /> <PanelContainer StyleClasses="LowDivider" />

View File

@@ -21,8 +21,7 @@ namespace Content.Client.Changelog
public ChangelogWindow() public ChangelogWindow()
{ {
RobustXamlLoader.Load(this); RobustXamlLoader.Load(this);
WindowTitle.AddStyleClass(StyleBase.StyleClassLabelHeading); WindowTitle.AddStyleClass(StyleClass.LabelHeading);
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
} }
protected override void Opened() protected override void Opened()

View File

@@ -82,7 +82,7 @@
<Label Text="{Loc 'chem-master-window-packaging-text'}" /> <Label Text="{Loc 'chem-master-window-packaging-text'}" />
<Control HorizontalExpand="True"/> <Control HorizontalExpand="True"/>
<Label Text="{Loc 'chem-master-window-buffer-label'}" /> <Label Text="{Loc 'chem-master-window-buffer-label'}" />
<Label Name="BufferCurrentVolume" StyleClasses="LabelSecondaryColor" /> <Label Name="BufferCurrentVolume" StyleClasses="LabelWeak" />
</BoxContainer> </BoxContainer>
<!-- Wrap the packaging info--> <!-- Wrap the packaging info-->
@@ -112,9 +112,9 @@
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'chem-master-window-pills-label'}" /> <Label Text="{Loc 'chem-master-window-pills-label'}" />
<Control HorizontalExpand="True" MinSize="50 0" /> <Control HorizontalExpand="True" MinSize="50 0" />
<Label Text="{Loc 'chem-master-window-pills-number-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" /> <Label Text="{Loc 'chem-master-window-pills-number-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
<SpinBox MinSize="100 0" Name="PillNumber" Access="Public" Value="0" /> <SpinBox MinSize="100 0" Name="PillNumber" Access="Public" Value="0" />
<Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" /> <Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
<SpinBox MinSize="100 0" Name="PillDosage" Access="Public" Value="1" /> <SpinBox MinSize="100 0" Name="PillDosage" Access="Public" Value="1" />
<Button MinSize="80 0" Name="CreatePillButton" Access="Public" Text="{Loc 'chem-master-window-create-button'}" /> <Button MinSize="80 0" Name="CreatePillButton" Access="Public" Text="{Loc 'chem-master-window-create-button'}" />
</BoxContainer> </BoxContainer>
@@ -122,7 +122,7 @@
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'chem-master-window-bottles-label'}" /> <Label Text="{Loc 'chem-master-window-bottles-label'}" />
<Control HorizontalExpand="True" MinSize="50 0" /> <Control HorizontalExpand="True" MinSize="50 0" />
<Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" /> <Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
<SpinBox MinSize="100 0" Name="BottleDosage" Access="Public" Value="0" /> <SpinBox MinSize="100 0" Name="BottleDosage" Access="Public" Value="0" />
<Button MinSize="80 0" Name="CreateBottleButton" Access="Public" Text="{Loc 'chem-master-window-create-button'}" /> <Button MinSize="80 0" Name="CreateBottleButton" Access="Public" Text="{Loc 'chem-master-window-create-button'}" />
</BoxContainer> </BoxContainer>

View File

@@ -53,14 +53,14 @@ namespace Content.Client.Chemistry.UI
{ {
// For every button decide which stylebase to have // For every button decide which stylebase to have
// Every row has 10 buttons // Every row has 10 buttons
String styleBase = StyleBase.ButtonOpenBoth; String styleBase = StyleClass.ButtonOpenBoth;
uint modulo = i % 10; uint modulo = i % 10;
if (i > 0 && modulo == 0) if (i > 0 && modulo == 0)
styleBase = StyleBase.ButtonOpenRight; styleBase = StyleClass.ButtonOpenRight;
else if (i > 0 && modulo == 9) else if (i > 0 && modulo == 9)
styleBase = StyleBase.ButtonOpenLeft; styleBase = StyleClass.ButtonOpenLeft;
else if (i == 0) else if (i == 0)
styleBase = StyleBase.ButtonOpenRight; styleBase = StyleClass.ButtonOpenRight;
// Generate buttons // Generate buttons
PillTypeButtons[i] = new Button PillTypeButtons[i] = new Button
@@ -113,16 +113,16 @@ namespace Content.Client.Chemistry.UI
var buttonConfigs = new (string text, ChemMasterReagentAmount amount, string styleClass)[] var buttonConfigs = new (string text, ChemMasterReagentAmount amount, string styleClass)[]
{ {
("1", ChemMasterReagentAmount.U1, StyleBase.ButtonOpenBoth), ("1", ChemMasterReagentAmount.U1, StyleClass.ButtonOpenBoth),
("5", ChemMasterReagentAmount.U5, StyleBase.ButtonOpenBoth), ("5", ChemMasterReagentAmount.U5, StyleClass.ButtonOpenBoth),
("10", ChemMasterReagentAmount.U10, StyleBase.ButtonOpenBoth), ("10", ChemMasterReagentAmount.U10, StyleClass.ButtonOpenBoth),
("15", ChemMasterReagentAmount.U15, StyleBase.ButtonOpenBoth), ("15", ChemMasterReagentAmount.U15, StyleClass.ButtonOpenBoth),
("20", ChemMasterReagentAmount.U20, StyleBase.ButtonOpenBoth), ("20", ChemMasterReagentAmount.U20, StyleClass.ButtonOpenBoth),
("25", ChemMasterReagentAmount.U25, StyleBase.ButtonOpenBoth), ("25", ChemMasterReagentAmount.U25, StyleClass.ButtonOpenBoth),
("30", ChemMasterReagentAmount.U30, StyleBase.ButtonOpenBoth), ("30", ChemMasterReagentAmount.U30, StyleClass.ButtonOpenBoth),
("50", ChemMasterReagentAmount.U50, StyleBase.ButtonOpenBoth), ("50", ChemMasterReagentAmount.U50, StyleClass.ButtonOpenBoth),
("100", ChemMasterReagentAmount.U100, StyleBase.ButtonOpenBoth), ("100", ChemMasterReagentAmount.U100, StyleClass.ButtonOpenBoth),
(Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleBase.ButtonOpenLeft), (Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleClass.ButtonOpenLeft),
}; };
var buttons = new List<ReagentButton>(); var buttons = new List<ReagentButton>();
@@ -252,7 +252,7 @@ namespace Content.Client.Chemistry.UI
var bufferVol = new Label var bufferVol = new Label
{ {
Text = $"{state.BufferCurrentVolume}u", Text = $"{state.BufferCurrentVolume}u",
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor } StyleClasses = { StyleClass.LabelWeak }
}; };
bufferHBox.AddChild(bufferVol); bufferHBox.AddChild(bufferVol);
@@ -321,7 +321,7 @@ namespace Content.Client.Chemistry.UI
new Label new Label
{ {
Text = $"{info.CurrentVolume}/{info.MaxVolume}", Text = $"{info.CurrentVolume}/{info.MaxVolume}",
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor } StyleClasses = { StyleClass.LabelWeak }
} }
} }
}); });
@@ -376,7 +376,7 @@ namespace Content.Client.Chemistry.UI
new Label new Label
{ {
Text = $"{quantity}u", Text = $"{quantity}u",
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor } StyleClasses = { StyleClass.LabelWeak }
}, },
// Padding // Padding

View File

@@ -23,7 +23,7 @@ public sealed class HyposprayStatusControl : Control
{ {
_parent = parent; _parent = parent;
_solutionContainers = solutionContainers; _solutionContainers = solutionContainers;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
} }

View File

@@ -24,7 +24,7 @@ public sealed class InjectorStatusControl : Control
{ {
_parent = parent; _parent = parent;
_solutionContainers = solutionContainers; _solutionContainers = solutionContainers;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
} }

View File

@@ -107,7 +107,7 @@ namespace Content.Client.Chemistry.UI
var quantityLabel = new Label var quantityLabel = new Label
{ {
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", quantity)), Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", quantity)),
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }, StyleClasses = { StyleClass.LabelWeak },
}; };
ContainerInfo.Children.Add(new BoxContainer ContainerInfo.Children.Add(new BoxContainer

View File

@@ -29,7 +29,7 @@ public sealed class SolutionStatusControl : PollingItemStatusControl<SolutionSta
_parent = parent; _parent = parent;
_entityManager = entityManager; _entityManager = entityManager;
_solutionContainers = solutionContainers; _solutionContainers = solutionContainers;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
} }

View File

@@ -17,7 +17,7 @@ namespace Content.Client.Cloning.UI
Title = Loc.GetString("accept-cloning-window-title"); Title = Loc.GetString("accept-cloning-window-title");
Contents.AddChild(new BoxContainer ContentsContainer.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical, Orientation = LayoutOrientation.Vertical,
Children = Children =

View File

@@ -67,7 +67,7 @@ public sealed partial class ChameleonMenu : DefaultWindow
MinSize = new Vector2(48, 48), MinSize = new Vector2(48, 48),
HorizontalExpand = true, HorizontalExpand = true,
Group = group, Group = group,
StyleClasses = {StyleBase.ButtonSquare}, StyleClasses = {StyleClass.ButtonSquare},
ToggleMode = true, ToggleMode = true,
Pressed = _selectedId == id, Pressed = _selectedId == id,
ToolTip = proto.Name ToolTip = proto.Name

View File

@@ -68,7 +68,7 @@ namespace Content.Client.Configurable.UI
outerColumn.AddChild(Column); outerColumn.AddChild(Column);
baseContainer.AddChild(outerColumn); baseContainer.AddChild(outerColumn);
baseContainer.AddChild(confirmButton); baseContainer.AddChild(confirmButton);
Contents.AddChild(baseContainer); ContentsContainer.AddChild(baseContainer);
} }
private void OnConfirm(ButtonEventArgs args) private void OnConfirm(ButtonEventArgs args)

View File

@@ -13,7 +13,8 @@
Name="IconLabel" Name="IconLabel"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Bottom" VerticalAlignment="Bottom"
StyleClasses="contextMenuIconLabel" StyleClasses="LabelSubText"
Align="Right"
Visible="false"/> Visible="false"/>
</SpriteView> </SpriteView>
<RichTextLabel <RichTextLabel

View File

@@ -16,7 +16,6 @@ namespace Content.Client.ContextMenu.UI
{ {
public const string StyleClassContextMenuButton = "contextMenuButton"; public const string StyleClassContextMenuButton = "contextMenuButton";
public const string StyleClassContextMenuExpansionTexture = "contextMenuExpansionTexture"; public const string StyleClassContextMenuExpansionTexture = "contextMenuExpansionTexture";
public const string StyleClassEntityMenuIconLabel = "contextMenuIconLabel";
public const float ElementMargin = 2; public const float ElementMargin = 2;
public const float ElementHeight = 32; public const float ElementHeight = 32;

View File

@@ -34,7 +34,7 @@ public sealed class CrayonSystem : SharedCrayonSystem
_crayon = crayon; _crayon = crayon;
_charges = charges; _charges = charges;
_capacity = entityManage.GetComponent<LimitedChargesComponent>(_crayon.Owner).MaxCharges; _capacity = entityManage.GetComponent<LimitedChargesComponent>(_crayon.Owner).MaxCharges;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
} }

View File

@@ -137,7 +137,8 @@ namespace Content.Client.Crayon.UI
private void ButtonOnPressed(ButtonEventArgs obj) private void ButtonOnPressed(ButtonEventArgs obj)
{ {
if (obj.Button.Name == null) return; if (obj.Button.Name == null)
return;
_selected = obj.Button.Name; _selected = obj.Button.Name;
_autoSelected = null; _autoSelected = null;

View File

@@ -258,7 +258,7 @@ public sealed partial class CreditsWindow : DefaultWindow
foreach (var entry in CreditsManager.GetLicenses(_resourceManager).OrderBy(p => p.Name)) foreach (var entry in CreditsManager.GetLicenses(_resourceManager).OrderBy(p => p.Name))
{ {
licensesContainer.AddChild(new Label licensesContainer.AddChild(new Label
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = entry.Name }); { StyleClasses = { StyleClass.LabelHeading }, Text = entry.Name });
// We split these line by line because otherwise // We split these line by line because otherwise
// the LGPL causes Clyde to go out of bounds in the rendering code. // the LGPL causes Clyde to go out of bounds in the rendering code.
@@ -299,7 +299,7 @@ public sealed partial class CreditsWindow : DefaultWindow
first = false; first = false;
patronsContainer.AddChild(new Label patronsContainer.AddChild(new Label
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = $"{tier.Key}" }); { StyleClasses = { StyleClass.LabelHeading }, Text = $"{tier.Key}" });
var msg = string.Join(", ", tier.OrderBy(p => p.Name).Select(p => p.Name)); var msg = string.Join(", ", tier.OrderBy(p => p.Name).Select(p => p.Name));
@@ -347,7 +347,7 @@ public sealed partial class CreditsWindow : DefaultWindow
first = false; first = false;
ss14ContributorsContainer.AddChild(new Label ss14ContributorsContainer.AddChild(new Label
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = title }); { StyleClasses = { StyleClass.LabelHeading }, Text = title });
var label = new RichTextLabel(); var label = new RichTextLabel();
var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}"); var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}");

View File

@@ -157,15 +157,12 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
{ {
var panelContainer = new PanelContainer var panelContainer = new PanelContainer
{ {
PanelOverride = new StyleBoxFlat
{
BackgroundColor = StyleNano.ButtonColorDefault
},
Children = Children =
{ {
button button
} }
}; };
panelContainer.SetOnlyStyleClass(StyleClass.PanelLight);
Grid.AddChild(panelContainer); Grid.AddChild(panelContainer);
} }
else else

View File

@@ -21,7 +21,7 @@ public sealed class HandheldGpsStatusControl : Control
_parent = parent; _parent = parent;
_entMan = IoCManager.Resolve<IEntityManager>(); _entMan = IoCManager.Resolve<IEntityManager>();
_transform = _entMan.System<TransformSystem>(); _transform = _entMan.System<TransformSystem>();
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
UpdateGpsDetails(); UpdateGpsDetails();
} }

View File

@@ -159,7 +159,7 @@ public sealed partial class GatewayWindow : FancyWindow,
if (Pressable()) if (Pressable())
{ {
openButton.AddStyleClass(StyleBase.ButtonCaution); openButton.AddStyleClass(StyleClass.Negative);
} }
var buttonContainer = new BoxContainer() var buttonContainer = new BoxContainer()

View File

@@ -15,7 +15,7 @@ public sealed class ReturnToBodyMenu : DefaultWindow
{ {
Title = Loc.GetString("ghost-return-to-body-title"); Title = Loc.GetString("ghost-return-to-body-title");
Contents.AddChild(new BoxContainer ContentsContainer.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical, Orientation = LayoutOrientation.Vertical,
Children = Children =

View File

@@ -116,7 +116,7 @@ public sealed partial class ChameleonControllerMenu : FancyWindow
var button = new Button var button = new Button
{ {
HorizontalExpand = true, HorizontalExpand = true,
StyleClasses = {StyleBase.ButtonSquare}, StyleClasses = {StyleClass.ButtonSquare},
ToolTip = Loc.GetString(name), ToolTip = Loc.GetString(name),
Text = Loc.GetString(name), Text = Loc.GetString(name),
Margin = new Thickness(0, 0, 15, 0), Margin = new Thickness(0, 0, 15, 0),

View File

@@ -19,7 +19,7 @@ public sealed class ImplanterStatusControl : Control
{ {
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
_parent = parent; _parent = parent;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
_label.MaxWidth = 350; _label.MaxWidth = 350;
AddChild(new ClipControl { Children = { _label } }); AddChild(new ClipControl { Children = { _label } });

View File

@@ -36,7 +36,7 @@ namespace Content.Client.Info
PopulateTutorial(tutorialList); PopulateTutorial(tutorialList);
Contents.AddChild(rootContainer); ContentsContainer.AddChild(rootContainer);
SetSize = new Vector2(650, 650); SetSize = new Vector2(650, 650);
} }

View File

@@ -16,7 +16,7 @@
Text="{Loc 'ui-rules-accept'}" Text="{Loc 'ui-rules-accept'}"
Disabled="True" /> Disabled="True" />
<Button Name="QuitButton" <Button Name="QuitButton"
StyleClasses="Caution" StyleClasses="negative"
Text="{Loc 'ui-escape-quit'}" /> Text="{Loc 'ui-escape-quit'}" />
</BoxContainer> </BoxContainer>
</BoxContainer> </BoxContainer>

View File

@@ -154,7 +154,7 @@ namespace Content.Client.Inventory
var button = new Button() var button = new Button()
{ {
Text = Loc.GetString("strippable-bound-user-interface-stripping-menu-ensnare-button"), Text = Loc.GetString("strippable-bound-user-interface-stripping-menu-ensnare-button"),
StyleClasses = { StyleBase.ButtonOpenRight } StyleClasses = { StyleClass.ButtonOpenRight }
}; };
button.OnPressed += (_) => SendPredictedMessage(new StrippingEnsnareButtonPressed()); button.OnPressed += (_) => SendPredictedMessage(new StrippingEnsnareButtonPressed());

View File

@@ -2,7 +2,6 @@
xmlns="https://spacestation14.io" xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:style="clr-namespace:Content.Client.Stylesheets"
Title="{Loc 'microwave-menu-title'}" Title="{Loc 'microwave-menu-title'}"
MinWidth="512" MinWidth="512"
MinSize="512 256"> MinSize="512 256">
@@ -78,14 +77,14 @@
Name="StartButton" Name="StartButton"
Access="Public" Access="Public"
Text="{Loc 'microwave-menu-start-button'}" Text="{Loc 'microwave-menu-start-button'}"
StyleClasses="ButtonColorGreen" StyleClasses="positive"
TextAlign="Center" /> TextAlign="Center" />
<Button <Button
Name="EjectButton" Name="EjectButton"
Access="Public" Access="Public"
Text="{Loc 'microwave-menu-eject-all-text'}" Text="{Loc 'microwave-menu-eject-all-text'}"
ToolTip="{Loc 'microwave-menu-eject-all-tooltip'}" ToolTip="{Loc 'microwave-menu-eject-all-tooltip'}"
StyleClasses="ButtonColorRed" StyleClasses="negative"
TextAlign="Center" /> TextAlign="Center" />
</BoxContainer> </BoxContainer>
</BoxContainer> </BoxContainer>

View File

@@ -61,7 +61,7 @@ namespace Content.Client.LateJoin
VerticalExpand = true, VerticalExpand = true,
}; };
Contents.AddChild(_base); ContentsContainer.AddChild(_base);
_jobRequirements.Updated += RebuildUI; _jobRequirements.Updated += RebuildUI;
RebuildUI(); RebuildUI();

View File

@@ -5,7 +5,7 @@
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"> xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
<parallax:ParallaxControl SpeedX="20"/> <parallax:ParallaxControl SpeedX="20"/>
<Control HorizontalAlignment="Center" VerticalAlignment="Center"> <Control HorizontalAlignment="Center" VerticalAlignment="Center">
<PanelContainer StyleClasses="AngleRect" /> <PanelContainer StyleClasses="BackgroundPanel" />
<BoxContainer Orientation="Vertical" MinSize="300 200"> <BoxContainer Orientation="Vertical" MinSize="300 200">
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">
<Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}" <Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}"
@@ -68,7 +68,7 @@
</BoxContainer> </BoxContainer>
</Control> </Control>
<!-- Bottom window for tips --> <!-- Bottom window for tips -->
<PanelContainer Name="LoginTips" StyleClasses="AngleRect" Margin="0 10" MaxWidth="600" VerticalExpand="True" VerticalAlignment="Bottom"> <PanelContainer Name="LoginTips" StyleClasses="BackgroundPanel" Margin="0 10" MaxWidth="600" VerticalExpand="True" VerticalAlignment="Bottom">
<BoxContainer Orientation="Vertical" VerticalExpand="True"> <BoxContainer Orientation="Vertical" VerticalExpand="True">
<controls:StripeBack> <controls:StripeBack>
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Center"> <BoxContainer Orientation="Horizontal" HorizontalAlignment="Center">

View File

@@ -43,7 +43,7 @@ namespace Content.Client.Launcher
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide); LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace; Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSystem;
ChangeLoginTip(); ChangeLoginTip();
RetryButton.OnPressed += ReconnectButtonPressed; RetryButton.OnPressed += ReconnectButtonPressed;

View File

@@ -18,7 +18,7 @@
<Button Name="ConfirmDeleteButton" <Button Name="ConfirmDeleteButton"
Text="{Loc 'character-setup-gui-character-picker-button-confirm-delete-button'}" Text="{Loc 'character-setup-gui-character-picker-button-confirm-delete-button'}"
Visible="False" Visible="False"
ModulateSelfOverride="{x:Static style:StyleNano.ButtonColorCautionDefault}"/> StyleClasses="negative"/>
</BoxContainer> </BoxContainer>
</ContainerButton> </ContainerButton>

View File

@@ -28,19 +28,13 @@
Text="{Loc 'character-setup-gui-character-setup-close-button'}" Text="{Loc 'character-setup-gui-character-setup-close-button'}"
StyleClasses="ButtonBig"/> StyleClasses="ButtonBig"/>
</BoxContainer> </BoxContainer>
<PanelContainer> <PanelContainer StyleClasses="highlight">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
</PanelContainer.PanelOverride>
</PanelContainer> </PanelContainer>
<BoxContainer Orientation="Horizontal" VerticalExpand="True" SeparationOverride="0"> <BoxContainer Orientation="Horizontal" VerticalExpand="True" SeparationOverride="0">
<ScrollContainer MinSize="325 0" Margin="5 5 0 0"> <ScrollContainer MinSize="325 0" Margin="5 5 0 0">
<BoxContainer Name="Characters" Orientation="Vertical" /> <BoxContainer Name="Characters" Orientation="Vertical" />
</ScrollContainer> </ScrollContainer>
<PanelContainer MinSize="2 0"> <PanelContainer MinSize="2 0" StyleClasses="highlight">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
</PanelContainer.PanelOverride>
</PanelContainer> </PanelContainer>
<BoxContainer Name="CharEditor" HorizontalExpand="True" /> <BoxContainer Name="CharEditor" HorizontalExpand="True" />
</BoxContainer> </BoxContainer>

View File

@@ -6,8 +6,8 @@ using Content.Client.Lobby.UI.Loadouts;
using Content.Client.Lobby.UI.Roles; using Content.Client.Lobby.UI.Roles;
using Content.Client.Message; using Content.Client.Message;
using Content.Client.Players.PlayTimeTracking; using Content.Client.Players.PlayTimeTracking;
using Content.Client.Sprite;
using Content.Client.Stylesheets; using Content.Client.Stylesheets;
using Content.Client.Sprite;
using Content.Client.UserInterface.Systems.Guidebook; using Content.Client.UserInterface.Systems.Guidebook;
using Content.Shared.CCVar; using Content.Shared.CCVar;
using Content.Shared.Clothing; using Content.Shared.Clothing;
@@ -539,7 +539,7 @@ namespace Content.Client.Lobby.UI
{ {
Text = Loc.GetString(category.Name), Text = Loc.GetString(category.Name),
Margin = new Thickness(0, 10, 0, 0), Margin = new Thickness(0, 10, 0, 0),
StyleClasses = { StyleBase.StyleClassLabelHeading }, StyleClasses = { StyleClass.LabelHeading },
}); });
} }
@@ -1348,7 +1348,7 @@ namespace Content.Client.Lobby.UI
return; return;
const string style = "SpeciesInfoDefault"; const string style = "SpeciesInfoDefault";
SpeciesInfoButton.StyleClasses.Add(style); SpeciesInfoButton.StyleIdentifier = style;
} }
private void UpdateMarkings() private void UpdateMarkings()

View File

@@ -0,0 +1,28 @@
using Content.Client.Resources;
using Content.Client.Stylesheets;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using static Content.Client.Stylesheets.StylesheetHelpers;
namespace Content.Client.Lobby.UI;
[CommonSheetlet]
public sealed class HumanoidProfileEditorSheetlet : Sheetlet<PalettedStylesheet>
{
public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
{
return
[
E<TextureButton>()
.Identifier("SpeciesInfoDefault")
.Prop(TextureButton.StylePropertyTexture,
ResCache.GetTexture("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
// copied from `StyleNano`, but this is unused
// E<TextureButton>()
// .Identifier("SpeciesInfoWarning")
// .Prop(TextureButton.StylePropertyTexture,
// ResCache.GetTexture("/Textures/Interface/info.svg.192dpi.png"))
// .Prop(Control.StylePropertyModulateSelf, sheet.HighlightPalette[0]),
];
}
}

View File

@@ -1,7 +1,7 @@
<BoxContainer xmlns="https://spacestation14.io" <BoxContainer xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Orientation="Vertical"> Orientation="Vertical">
<PanelContainer StyleClasses="AngleRect" HorizontalExpand="True" Margin="5"> <PanelContainer StyleClasses="BackgroundPanel" HorizontalExpand="True" Margin="5">
<BoxContainer Name="LoadoutsContainer" Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True"/> <BoxContainer Name="LoadoutsContainer" Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True"/>
</PanelContainer> </PanelContainer>
<!-- Buffer space so we have 10 margin between controls but also 10 to the borders --> <!-- Buffer space so we have 10 margin between controls but also 10 to the borders -->

View File

@@ -20,7 +20,7 @@
<Control Name="DefaultState" VerticalExpand="True"> <Control Name="DefaultState" VerticalExpand="True">
<BoxContainer Name="TopLeft" Orientation="Vertical"> <BoxContainer Name="TopLeft" Orientation="Vertical">
<!-- Left Top Panel --> <!-- Left Top Panel -->
<PanelContainer StyleClasses="AngleRect" HorizontalAlignment="Left" Name="LeftSideTop" <PanelContainer StyleClasses="BackgroundPanel" HorizontalAlignment="Left" Name="LeftSideTop"
VerticalAlignment="Top"> VerticalAlignment="Top">
<BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800"> <BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800">
<info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center" <info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center"
@@ -53,7 +53,7 @@
<!-- Left Bot Panel --> <!-- Left Bot Panel -->
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom"> <BoxContainer Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<info:DevInfoBanner Name="DevInfoBanner" VerticalExpand="false" Margin="3 3 3 3" /> <info:DevInfoBanner Name="DevInfoBanner" VerticalExpand="false" Margin="3 3 3 3" />
<PanelContainer StyleClasses="AngleRect"> <PanelContainer StyleClasses="BackgroundPanel">
<RichTextLabel Name="LobbySong" Access="Public" HorizontalAlignment="Center" /> <RichTextLabel Name="LobbySong" Access="Public" HorizontalAlignment="Center" />
</PanelContainer> </PanelContainer>
</BoxContainer> </BoxContainer>
@@ -63,7 +63,7 @@
<Control Access="Public" Visible="False" Name="CharacterSetupState" VerticalExpand="True" /> <Control Access="Public" Visible="False" Name="CharacterSetupState" VerticalExpand="True" />
</BoxContainer> </BoxContainer>
<!-- Right Panel --> <!-- Right Panel -->
<PanelContainer Name="RightSide" Access="Public" StyleClasses="AngleRect" HorizontalAlignment="Right" VerticalExpand="True" <PanelContainer Name="RightSide" Access="Public" StyleClasses="BackgroundPanel" HorizontalAlignment="Right" VerticalExpand="True"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<BoxContainer Orientation="Vertical" HorizontalExpand="True"> <BoxContainer Orientation="Vertical" HorizontalExpand="True">
<!-- Top row --> <!-- Top row -->
@@ -73,7 +73,7 @@
HorizontalExpand="True" HorizontalAlignment="Center" /> HorizontalExpand="True" HorizontalAlignment="Center" />
</BoxContainer> </BoxContainer>
<!-- Gold line --> <!-- Gold line -->
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" /> <controls:HLine StyleClasses="highlight" Thickness="2" />
<controls:HSpacer Spacing="10" /> <controls:HSpacer Spacing="10" />
<!-- Voting & misc button bar --> <!-- Voting & misc button bar -->
<BoxContainer Orientation="Horizontal" MinSize="0 40" HorizontalAlignment="Right"> <BoxContainer Orientation="Horizontal" MinSize="0 40" HorizontalAlignment="Right">
@@ -97,7 +97,7 @@
<controls:HSpacer Spacing="5" /> <controls:HSpacer Spacing="5" />
<BoxContainer MinHeight="10" /> <BoxContainer MinHeight="10" />
<!-- Gold line --> <!-- Gold line -->
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" Access="Public" /> <controls:HLine StyleClasses="highlight" Thickness="2" Access="Public" />
<controls:HSpacer Spacing="10" /> <controls:HSpacer Spacing="10" />
<widgets:ChatBox Name="Chat" Access="Public" VerticalExpand="True" Margin="3 3 3 3" MinHeight="50" /> <widgets:ChatBox Name="Chat" Access="Public" VerticalExpand="True" Margin="3 3 3 3" MinHeight="50" />
</BoxContainer> </BoxContainer>
@@ -111,7 +111,7 @@
</PanelContainer> </PanelContainer>
</SplitContainer> </SplitContainer>
<PanelContainer Name="ExpandPanel" <PanelContainer Name="ExpandPanel"
StyleClasses="AngleRect" StyleClasses="BackgroundPanel"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Top" VerticalAlignment="Top"
Margin="0 2 2 0" Margin="0 2 2 0"

View File

@@ -7,7 +7,7 @@
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">
<Button Name="NevermindButton" Text="{Loc 'observe-nevermind'}" SizeFlagsStretchRatio="1"/> <Button Name="NevermindButton" Text="{Loc 'observe-nevermind'}" SizeFlagsStretchRatio="1"/>
<Control HorizontalExpand="True" SizeFlagsStretchRatio="2" /> <Control HorizontalExpand="True" SizeFlagsStretchRatio="2" />
<cc:CommandButton Command="observe" Name="ObserveButton" StyleClasses="Caution" Text="{Loc 'observe-confirm'}" SizeFlagsStretchRatio="1"/> <cc:CommandButton Command="observe" Name="ObserveButton" StyleClasses="negative" Text="{Loc 'observe-confirm'}" SizeFlagsStretchRatio="1"/>
<cc:CommandButton Command="observe admin" Name="ObserveAsAdminButton" Text="{Loc 'observe-as-admin'}" SizeFlagsStretchRatio="1" Visible="False"/> <cc:CommandButton Command="observe admin" Name="ObserveAsAdminButton" Text="{Loc 'observe-as-admin'}" SizeFlagsStretchRatio="1" Visible="False"/>
</BoxContainer> </BoxContainer>
</BoxContainer> </BoxContainer>

View File

@@ -31,9 +31,9 @@ public sealed partial class RequirementsSelector : BoxContainer
RobustXamlLoader.Load(this); RobustXamlLoader.Load(this);
_options = new RadioOptions<int>(RadioOptionsLayout.Horizontal) _options = new RadioOptions<int>(RadioOptionsLayout.Horizontal)
{ {
FirstButtonStyle = StyleBase.ButtonOpenRight, FirstButtonStyle = StyleClass.ButtonOpenRight,
ButtonStyle = StyleBase.ButtonOpenBoth, ButtonStyle = StyleClass.ButtonOpenBoth,
LastButtonStyle = StyleBase.ButtonOpenLeft, LastButtonStyle = StyleClass.ButtonOpenLeft,
HorizontalExpand = true, HorizontalExpand = true,
}; };
//Override default radio option button width //Override default radio option button width
@@ -50,7 +50,7 @@ public sealed partial class RequirementsSelector : BoxContainer
Text = Loc.GetString("role-timer-locked"), Text = Loc.GetString("role-timer-locked"),
Visible = true, Visible = true,
HorizontalAlignment = HAlignment.Center, HorizontalAlignment = HAlignment.Center,
StyleClasses = {StyleBase.StyleClassLabelSubText}, StyleClasses = {StyleClass.LabelSubText},
}; };
_lockStripe = new StripeBack() _lockStripe = new StripeBack()

View File

@@ -11,6 +11,9 @@ namespace Content.Client.MainMenu.UI;
[GenerateTypedNameReferences] [GenerateTypedNameReferences]
public sealed partial class MainMenuControl : Control public sealed partial class MainMenuControl : Control
{ {
public const string StyleIdentifierMainMenu = "mainMenu";
public const string StyleIdentifierMainMenuVBox = "mainMenuVBox";
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan) public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
{ {
RobustXamlLoader.Load(this); RobustXamlLoader.Load(this);

View File

@@ -0,0 +1,27 @@
using Content.Client.Stylesheets;
using Content.Client.Stylesheets.Fonts;
using Content.Client.Stylesheets.Stylesheets;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using static Content.Client.Stylesheets.StylesheetHelpers;
namespace Content.Client.MainMenu.UI;
[CommonSheetlet]
public sealed class MainMenuSheetlet : Sheetlet<NanotrasenStylesheet>
{
public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
{
return
[
// make those buttons bigger
E<Button>()
.Identifier(MainMenuControl.StyleIdentifierMainMenu)
.ParentOf(E<Label>())
.Font(sheet.BaseFont.GetFont(16, FontKind.Bold)),
E<BoxContainer>()
.Identifier(MainMenuControl.StyleIdentifierMainMenuVBox)
.Prop(BoxContainer.StylePropertySeparation, 2),
];
}
}

View File

@@ -1,7 +1,7 @@
<Control xmlns="https://spacestation14.io" <Control xmlns="https://spacestation14.io"
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
MouseFilter="Stop"> MouseFilter="Stop">
<PanelContainer StyleClasses="BackgroundOpenLeft"/> <PanelContainer StyleClasses="BackgroundPanelOpenLeft"/>
<PanelContainer> <PanelContainer>
<PanelContainer.PanelOverride> <PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BorderColor="#25252A" BorderThickness="0 0 0 3"/> <graphics:StyleBoxFlat BorderColor="#25252A" BorderThickness="0 0 0 3"/>
@@ -20,7 +20,7 @@
<Label Text="{Loc news-write-ui-article-name-label}" Margin="17 10 0 9" VerticalAlignment="Center"/> <Label Text="{Loc news-write-ui-article-name-label}" Margin="17 10 0 9" VerticalAlignment="Center"/>
<LineEdit Name="TitleField" Margin="6 10 0 9" MinWidth="260" MinHeight="23" Access="Public"/> <LineEdit Name="TitleField" Margin="6 10 0 9" MinWidth="260" MinHeight="23" Access="Public"/>
<Control HorizontalExpand="True" /> <Control HorizontalExpand="True" />
<Label Name="RichTextInfoLabel" Text="?" MouseFilter="Pass" Margin="14 0" StyleClasses="LabelSecondaryColor"/> <Label Name="RichTextInfoLabel" Text="?" MouseFilter="Pass" Margin="14 0" StyleClasses="LabelWeak"/>
</BoxContainer> </BoxContainer>
<Control Name="TextEditPanel" VerticalExpand="True" Margin="11 0 11 0"> <Control Name="TextEditPanel" VerticalExpand="True" Margin="11 0 11 0">
<PanelContainer> <PanelContainer>
@@ -43,7 +43,7 @@
<BoxContainer Orientation="Horizontal" Margin="12 5 12 8"> <BoxContainer Orientation="Horizontal" Margin="12 5 12 8">
<Control> <Control>
<Button Name="ButtonCancel" SetHeight="32" SetWidth="85" <Button Name="ButtonCancel" SetHeight="32" SetWidth="85"
StyleClasses="ButtonColorRed" Text="{Loc news-write-ui-cancel-text}"/> StyleClasses="negative" Text="{Loc news-write-ui-cancel-text}"/>
</Control> </Control>
<Control HorizontalExpand="True"/> <Control HorizontalExpand="True"/>
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">

View File

@@ -22,8 +22,8 @@ public sealed partial class ArticleEditorPanel : Control
{ {
RobustXamlLoader.Load(this); RobustXamlLoader.Load(this);
ButtonPublish.StyleClasses.Add(StyleBase.ButtonOpenLeft); ButtonPublish.StyleClasses.Add(StyleClass.ButtonOpenLeft);
ButtonPublish.StyleClasses.Add(StyleNano.StyleClassButtonColorGreen); ButtonPublish.StyleClasses.Add(StyleClass.Positive);
ContentField.GetChild(0).Margin = new Thickness(9, 3); ContentField.GetChild(0).Margin = new Thickness(9, 3);
// Customize scrollbar width and margin. This is not possible in xaml // Customize scrollbar width and margin. This is not possible in xaml

View File

@@ -3,7 +3,7 @@
xmlns:system="clr-namespace:System;assembly=System.Runtime" xmlns:system="clr-namespace:System;assembly=System.Runtime"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Margin="0 0 0 8"> Margin="0 0 0 8">
<PanelContainer StyleClasses="AngleRect" ModulateSelfOverride="#2b2b31"/> <PanelContainer StyleClasses="BackgroundPanel" ModulateSelfOverride="#2b2b31"/>
<BoxContainer Orientation="Vertical" SetHeight="60"> <BoxContainer Orientation="Vertical" SetHeight="60">
<Control HorizontalExpand="True" SetHeight="27"> <Control HorizontalExpand="True" SetHeight="27">
<PanelContainer> <PanelContainer>
@@ -21,7 +21,7 @@
HorizontalAlignment="Right" Margin="8 6 6 6" SetHeight="19" SetWidth="52" Access="Public"> HorizontalAlignment="Right" Margin="8 6 6 6" SetHeight="19" SetWidth="52" Access="Public">
<Button.StyleClasses> <Button.StyleClasses>
<system:String>ButtonSmall</system:String> <system:String>ButtonSmall</system:String>
<system:String>ButtonColorRed</system:String> <system:String>negative</system:String>
</Button.StyleClasses> </Button.StyleClasses>
</controls:ConfirmButton> </controls:ConfirmButton>
</BoxContainer> </BoxContainer>

View File

@@ -77,11 +77,11 @@ public sealed partial class MaterialDisplay : PanelContainer
{ {
var sheetsToEject = sheetsToEjectArray[i]; var sheetsToEject = sheetsToEjectArray[i];
var styleClass = StyleBase.ButtonOpenBoth; var styleClass = StyleClass.ButtonOpenBoth;
if (i == 0) if (i == 0)
styleClass = StyleBase.ButtonOpenRight; styleClass = StyleClass.ButtonOpenRight;
else if (i == sheetsToEjectArray.Length - 1) else if (i == sheetsToEjectArray.Length - 1)
styleClass = StyleBase.ButtonOpenLeft; styleClass = StyleClass.ButtonOpenLeft;
var button = new Button var button = new Button
{ {

View File

@@ -130,7 +130,7 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
}; };
deparmentLabel.SetMessage(department); deparmentLabel.SetMessage(department);
deparmentLabel.StyleClasses.Add(StyleNano.StyleClassTooltipActionDescription); deparmentLabel.StyleClasses.Add("font-large");
SensorsTable.AddChild(deparmentLabel); SensorsTable.AddChild(deparmentLabel);
@@ -156,7 +156,6 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
}; };
deparmentLabel.SetMessage(Loc.GetString("crew-monitoring-ui-no-department-label")); deparmentLabel.SetMessage(Loc.GetString("crew-monitoring-ui-no-department-label"));
deparmentLabel.StyleClasses.Add(StyleNano.StyleClassTooltipActionDescription);
SensorsTable.AddChild(deparmentLabel); SensorsTable.AddChild(deparmentLabel);
@@ -194,7 +193,7 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
}; };
if (sensor.SuitSensorUid == _trackedEntity) if (sensor.SuitSensorUid == _trackedEntity)
sensorButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen); sensorButton.AddStyleClass(StyleClass.Positive);
SensorsTable.AddChild(sensorButton); SensorsTable.AddChild(sensorButton);
@@ -364,10 +363,10 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
var castSensor = (CrewMonitoringButton) sensor; var castSensor = (CrewMonitoringButton) sensor;
if (castSensor.SuitSensorUid == prevTrackedEntity) if (castSensor.SuitSensorUid == prevTrackedEntity)
castSensor.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen); castSensor.RemoveStyleClass(StyleClass.Positive);
else if (castSensor.SuitSensorUid == currTrackedEntity) else if (castSensor.SuitSensorUid == currTrackedEntity)
castSensor.AddStyleClass(StyleNano.StyleClassButtonColorGreen); castSensor.AddStyleClass(StyleClass.Positive);
if (castSensor?.Coordinates == null) if (castSensor?.Coordinates == null)
continue; continue;

View File

@@ -15,8 +15,8 @@ public sealed partial class NetworkConfiguratorConfigurationMenu : FancyWindow
{ {
RobustXamlLoader.Load(this); RobustXamlLoader.Load(this);
Clear.StyleClasses.Add(StyleBase.ButtonOpenLeft); Clear.StyleClasses.Add(StyleClass.ButtonOpenLeft);
Clear.StyleClasses.Add(StyleNano.StyleClassButtonColorRed); Clear.StyleClasses.Add(StyleClass.Negative);
DeviceList.OnRemoveAddress += args => DeviceList.OnRemoveAddress += args =>
{ {
OnRemoveAddress?.Invoke(args); OnRemoveAddress?.Invoke(args);

View File

@@ -1,9 +1,8 @@
<ScrollContainer xmlns="https://spacestation14.io" <ScrollContainer xmlns="https://spacestation14.io"
HorizontalExpand="True" HorizontalExpand="True"
VerticalExpand="True"> VerticalExpand="True">
<Control VerticalExpand="True"> <PanelContainer StyleClasses="PanelDark" VerticalExpand="True">
<PanelContainer StyleClasses="PanelBackgroundBaseDark"></PanelContainer>
<BoxContainer Orientation="Vertical" Name="DeviceList" VerticalExpand="True" SeparationOverride="4"> <BoxContainer Orientation="Vertical" Name="DeviceList" VerticalExpand="True" SeparationOverride="4">
</BoxContainer> </BoxContainer>
</Control> </PanelContainer>
</ScrollContainer> </ScrollContainer>

View File

@@ -47,7 +47,7 @@ public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
FooterPanel.PanelOverride = footerStyleBox; FooterPanel.PanelOverride = footerStyleBox;
MainPanel.PanelOverride = new StyleBoxFlat(Color.FromHex(PanelBgColor)); MainPanel.PanelOverride = new StyleBoxFlat(Color.FromHex(PanelBgColor));
ButtonClear.AddStyleClass("ButtonColorRed"); ButtonClear.AddStyleClass("negative");
ButtonLinkDefault.Disabled = true; ButtonLinkDefault.Disabled = true;
_links = new LinksRender(ButtonContainerLeft, ButtonContainerRight); _links = new LinksRender(ButtonContainerLeft, ButtonContainerRight);

View File

@@ -112,7 +112,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
{ {
_configurator = configurator; _configurator = configurator;
_keyBindingName = keyBindingName; _keyBindingName = keyBindingName;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
} }

View File

@@ -39,7 +39,7 @@
<Button Name="ArmButton" <Button Name="ArmButton"
Text="{Loc 'nuke-user-interface-arm-button'}" Text="{Loc 'nuke-user-interface-arm-button'}"
Access="Public" Access="Public"
StyleClasses="Caution"/> StyleClasses="negative"/>
</BoxContainer> </BoxContainer>
</BoxContainer> </BoxContainer>
</BoxContainer> </BoxContainer>

View File

@@ -9,7 +9,7 @@
Access="Public" /> Access="Public" />
<Button Name="WarButton" <Button Name="WarButton"
Text="{Loc 'war-declarator-ui-try-war-button'}" Text="{Loc 'war-declarator-ui-try-war-button'}"
StyleClasses="Caution" StyleClasses="negative"
Access="Public"/> Access="Public"/>
<BoxContainer Orientation="Vertical" HorizontalExpand="True"> <BoxContainer Orientation="Vertical" HorizontalExpand="True">
<Label Name="StatusLabel" <Label Name="StatusLabel"

View File

@@ -58,38 +58,38 @@ public sealed partial class WarDeclaratorWindow : FancyWindow
WarButton.Disabled = true; WarButton.Disabled = true;
StatusLabel.Text = Loc.GetString("war-declarator-boost-declared"); StatusLabel.Text = Loc.GetString("war-declarator-boost-declared");
UpdateTimer(); UpdateTimer();
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateLow); StatusLabel.SetOnlyStyleClass(StyleClass.Highlight);
break; break;
case WarConditionStatus.YesWar: case WarConditionStatus.YesWar:
WarButton.Text = Loc.GetString("war-declarator-ui-war-button"); WarButton.Text = Loc.GetString("war-declarator-ui-war-button");
StatusLabel.Text = Loc.GetString("war-declarator-boost-possible"); StatusLabel.Text = Loc.GetString("war-declarator-boost-possible");
UpdateTimer(); UpdateTimer();
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood); StatusLabel.SetOnlyStyleClass(StyleClass.Positive);
break; break;
case WarConditionStatus.NoWarSmallCrew: case WarConditionStatus.NoWarSmallCrew:
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible"); StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
InfoLabel.Text = Loc.GetString("war-declarator-conditions-small-crew"); InfoLabel.Text = Loc.GetString("war-declarator-conditions-small-crew");
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone); StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
break; break;
case WarConditionStatus.NoWarShuttleDeparted: case WarConditionStatus.NoWarShuttleDeparted:
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible"); StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
InfoLabel.Text = Loc.GetString("war-declarator-conditions-left-outpost"); InfoLabel.Text = Loc.GetString("war-declarator-conditions-left-outpost");
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone); StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
break; break;
case WarConditionStatus.NoWarTimeout: case WarConditionStatus.NoWarTimeout:
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible"); StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
InfoLabel.Text = Loc.GetString("war-declarator-conditions-time-out"); InfoLabel.Text = Loc.GetString("war-declarator-conditions-time-out");
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone); StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
break; break;
case WarConditionStatus.NoWarUnknown: case WarConditionStatus.NoWarUnknown:
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible"); StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
InfoLabel.Text = Loc.GetString("war-declarator-conditions-unknown"); InfoLabel.Text = Loc.GetString("war-declarator-conditions-unknown");
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone); StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
break; break;
default: default:
StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible"); StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
InfoLabel.Text = Loc.GetString("war-declarator-conditions-unknown"); InfoLabel.Text = Loc.GetString("war-declarator-conditions-unknown");
StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone); StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
break; break;
} }
} }

View File

@@ -9,7 +9,7 @@
<Button Name="ResetButton" <Button Name="ResetButton"
Text="{Loc 'ui-options-reset-all'}" Text="{Loc 'ui-options-reset-all'}"
StyleClasses="Caution" /> StyleClasses="negative" />
<Button Name="ApplyButton" <Button Name="ApplyButton"
Text="{Loc 'ui-options-apply'}" Text="{Loc 'ui-options-apply'}"
StyleClasses="OpenLeft" /> StyleClasses="OpenLeft" />

View File

@@ -58,7 +58,7 @@ public sealed partial class OptionsTabControlRow : Control
RobustXamlLoader.Load(this); RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
ResetButton.StyleClasses.Add(StyleBase.ButtonOpenRight); ResetButton.StyleClasses.Add(StyleClass.ButtonOpenRight);
ApplyButton.OnPressed += ApplyButtonPressed; ApplyButton.OnPressed += ApplyButtonPressed;
ResetButton.OnPressed += ResetButtonPressed; ResetButton.OnPressed += ResetButtonPressed;
DefaultButton.OnPressed += DefaultButtonPressed; DefaultButton.OnPressed += DefaultButtonPressed;

View File

@@ -130,8 +130,7 @@ namespace Content.Client.Options.UI.Tabs
KeybindsContainer.AddChild(new Label KeybindsContainer.AddChild(new Label
{ {
Text = Loc.GetString(headerContents), Text = Loc.GetString(headerContents),
FontColorOverride = StyleNano.NanoGold, StyleClasses = { StyleClass.LabelKeyText }
StyleClasses = { StyleNano.StyleClassLabelKeyText }
}); });
} }
@@ -528,9 +527,9 @@ namespace Content.Client.Options.UI.Tabs
HorizontalAlignment = HAlignment.Left HorizontalAlignment = HAlignment.Left
}; };
BindButton1 = new BindButton(parent, this, StyleBase.ButtonOpenRight); BindButton1 = new BindButton(parent, this, StyleClass.ButtonOpenRight);
BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft); BindButton2 = new BindButton(parent, this, StyleClass.ButtonOpenLeft);
ResetButton = new Button { Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleBase.ButtonCaution } }; ResetButton = new Button { Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleClass.Negative } };
var hBox = new BoxContainer var hBox = new BoxContainer
{ {

View File

@@ -0,0 +1,93 @@
using Content.Client.PDA;
using Content.Client.Stylesheets;
using Content.Client.Stylesheets.Sheetlets;
using Content.Client.Stylesheets.SheetletConfigs;
using Content.Client.Stylesheets.Stylesheets;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using static Content.Client.Stylesheets.StylesheetHelpers;
namespace Content.Client.PDA;
[CommonSheetlet]
public sealed class PdaSheetlet : Sheetlet<NanotrasenStylesheet>
{
public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
{
IPanelConfig panelCfg = sheet;
IButtonConfig btnCfg = sheet;
// TODO: This should have its own set of images, instead of using button cfg directly.
var angleBorderRect =
sheet.GetTexture(panelCfg.GeometricPanelBorderPath).IntoPatch(StyleBox.Margin.All, 10);
return
[
//PDA - Backgrounds
E<PanelContainer>()
.Class("PdaContentBackground")
.Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.SquareStyleBox(sheet))
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#25252a")),
E<PanelContainer>()
.Class("PdaBackground")
.Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.SquareStyleBox(sheet))
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#000000")),
E<PanelContainer>()
.Class("PdaBackgroundRect")
.Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.BaseStyleBox((sheet)))
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#717059")),
E<PanelContainer>()
.Class("PdaBorderRect")
.Prop(PanelContainer.StylePropertyPanel, angleBorderRect),
//PDA - Buttons
E<PdaSettingsButton>()
.Pseudo(ContainerButton.StylePseudoClassNormal)
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
E<PdaSettingsButton>()
.Pseudo(ContainerButton.StylePseudoClassHover)
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.HoverColor))
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
E<PdaSettingsButton>()
.Pseudo(ContainerButton.StylePseudoClassPressed)
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.PressedColor))
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
E<PdaSettingsButton>()
.Pseudo(ContainerButton.StylePseudoClassDisabled)
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.DisabledFgColor)),
E<PdaProgramItem>()
.Pseudo(ContainerButton.StylePseudoClassNormal)
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.NormalBgColor)),
E<PdaProgramItem>()
.Pseudo(ContainerButton.StylePseudoClassHover)
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
E<PdaProgramItem>()
.Pseudo(ContainerButton.StylePseudoClassPressed)
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
//PDA - Text
E<Label>()
.Class("PdaContentFooterText")
.Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(10))
.Prop(Label.StylePropertyFontColor, Color.FromHex("#757575")),
E<Label>()
.Class("PdaWindowFooterText")
.Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(10))
.Prop(Label.StylePropertyFontColor, Color.FromHex("#333d3b")),
];
}
}

View File

@@ -43,12 +43,12 @@ namespace Content.Client.PDA.Ringer
if (!isValid) if (!isValid)
{ {
input.Text = PreviousNoteInputs[index]; input.Text = PreviousNoteInputs[index];
input.AddStyleClass("Caution"); input.AddStyleClass("highlight");
} }
else else
{ {
PreviousNoteInputs[index] = input.Text; PreviousNoteInputs[index] = input.Text;
input.RemoveStyleClass("Caution"); input.RemoveStyleClass("highlight");
} }
input.CursorPosition = input.Text.Length; input.CursorPosition = input.Text.Length;
@@ -59,7 +59,7 @@ namespace Content.Client.PDA.Ringer
if (!IsNote(input.Text)) if (!IsNote(input.Text))
{ {
input.Text = PreviousNoteInputs[index]; input.Text = PreviousNoteInputs[index];
input.RemoveStyleClass("Caution"); input.RemoveStyleClass("highlight");
} }
}; };
@@ -68,7 +68,7 @@ namespace Content.Client.PDA.Ringer
if (!IsNote(input.Text)) if (!IsNote(input.Text))
{ {
input.Text = PreviousNoteInputs[index]; input.Text = PreviousNoteInputs[index];
input.RemoveStyleClass("Caution"); input.RemoveStyleClass("highlight");
} }
input.CursorPosition = input.Text.Length; input.CursorPosition = input.Text.Length;
}; };

View File

@@ -0,0 +1,33 @@
using Content.Client.Resources;
using Content.Client.Stylesheets;
using Content.Client.Stylesheets.SheetletConfigs;
using Content.Client.Stylesheets.Stylesheets;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using static Content.Client.Stylesheets.StylesheetHelpers;
namespace Content.Client.Paper.UI;
[CommonSheetlet]
public sealed class PaperSheetlet : Sheetlet<NanotrasenStylesheet>
{
public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
{
var windowCfg = (IWindowConfig)sheet;
var paperBackground = ResCache.GetTexture("/Textures/Interface/Paper/paper_background_default.svg.96dpi.png")
.IntoPatch(StyleBox.Margin.All, 16);
var paperBox = new StyleBoxTexture
{ Texture = sheet.GetTexture(windowCfg.TransparentWindowBackgroundBorderedPath) };
paperBox.SetPatchMargin(StyleBox.Margin.All, 2);
return
[
E<PanelContainer>().Identifier("PaperContainer").Panel(paperBox),
E<PanelContainer>()
.Identifier("PaperDefaultBorder")
.Prop(PanelContainer.StylePropertyPanel, paperBackground),
];
}
}

View File

@@ -4,18 +4,18 @@
SetSize="510 660"> <!-- Provide some reasonable sizes by default. Can be changed by the component --> SetSize="510 660"> <!-- Provide some reasonable sizes by default. Can be changed by the component -->
<BoxContainer Name="ContentsRoot" Orientation="Vertical"> <BoxContainer Name="ContentsRoot" Orientation="Vertical">
<PanelContainer StyleClasses="AngleRect" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="6"> <PanelContainer StyleClasses="BackgroundPanel" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="6">
<TextureButton Name="CloseButton" StyleClasses="windowCloseButton"/> <TextureButton Name="CloseButton" StyleClasses="windowCloseButton"/>
</PanelContainer> </PanelContainer>
<PanelContainer Name="PaperBackground" StyleClasses="PaperDefaultBorder" VerticalExpand="True" HorizontalExpand="True"> <PanelContainer Name="PaperBackground" StyleIdentifier="PaperDefaultBorder" VerticalExpand="True" HorizontalExpand="True">
<ScrollContainer Name="ScrollingContents" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="False"> <ScrollContainer Name="ScrollingContents" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="False">
<PanelContainer Name="PaperContent" VerticalExpand="True" HorizontalExpand="True" MaxWidth="600"> <PanelContainer Name="PaperContent" VerticalExpand="True" HorizontalExpand="True" MaxWidth="600">
<BoxContainer Orientation="Vertical" VerticalAlignment="Stretch"> <BoxContainer Orientation="Vertical" VerticalAlignment="Stretch">
<TextureButton Name="HeaderImage" HorizontalAlignment="Center" VerticalAlignment="Top" MouseFilter="Ignore"/> <TextureButton Name="HeaderImage" HorizontalAlignment="Center" VerticalAlignment="Top" MouseFilter="Ignore"/>
<Control Name="TextAlignmentPadding" VerticalAlignment="Top"/> <Control Name="TextAlignmentPadding" VerticalAlignment="Top"/>
<RichTextLabel Name="BlankPaperIndicator" StyleClasses="LabelSecondaryColor" VerticalAlignment="Top" HorizontalAlignment="Center"/> <RichTextLabel Name="BlankPaperIndicator" StyleClasses="LabelWeak" VerticalAlignment="Top" HorizontalAlignment="Center"/>
<RichTextLabel StyleClasses="PaperWrittenText" Name="WrittenTextLabel" VerticalAlignment="Top"/> <RichTextLabel StyleClasses="PaperWrittenText" Name="WrittenTextLabel" VerticalAlignment="Top"/>
<BoxContainer Name="InputContainer" Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Stretch"> <BoxContainer Name="InputContainer" StyleIdentifier="PaperContainer" Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Stretch">
<PanelContainer StyleClasses="TransparentBorderedWindowPanel" MinHeight="100" <PanelContainer StyleClasses="TransparentBorderedWindowPanel" MinHeight="100"
VerticalAlignment="Stretch" VerticalExpand="True" HorizontalExpand="True"> VerticalAlignment="Stretch" VerticalExpand="True" HorizontalExpand="True">
<TextEdit Name="Input" StyleClasses="PaperLineEdit" Access="Public" /> <TextEdit Name="Input" StyleClasses="PaperLineEdit" Access="Public" />

View File

@@ -1,10 +1,7 @@
<paper:StampWidget xmlns="https://spacestation14.io" <paper:StampWidget xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:style="clr-namespace:Content.Client.Stylesheets" xmlns:paper="clr-namespace:Content.Client.Paper.UI"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" HorizontalAlignment="Center"
xmlns:paper="clr-namespace:Content.Client.Paper.UI" HorizontalAlignment="Center" Margin="6"> Margin="6">
<paper:StampLabel Name="StampedByLabel" StyleClasses="LabelHeadingBigger" Margin="12 6 12 6" />
<paper:StampLabel Name="StampedByLabel" StyleClasses="LabelHeadingBigger"
FontColorOverride="{x:Static style:StyleNano.DangerousRedFore}"
Margin="12 6 12 6"/>
</paper:StampWidget> </paper:StampWidget>

View File

@@ -128,11 +128,7 @@ public partial class NavMapControl : MapGridControl
var topPanel = new PanelContainer() var topPanel = new PanelContainer()
{ {
PanelOverride = new StyleBoxFlat() StyleClasses = { StyleClass.PanelDark },
{
BackgroundColor = StyleNano.ButtonColorContext.WithAlpha(1f),
BorderColor = StyleNano.PanelDark
},
VerticalExpand = false, VerticalExpand = false,
HorizontalExpand = true, HorizontalExpand = true,
SetWidth = 650f, SetWidth = 650f,

View File

@@ -18,15 +18,15 @@
<GridContainer Margin="10 0 0 0" Columns="2"> <GridContainer Margin="10 0 0 0" Columns="2">
<!-- Power On/Off --> <!-- Power On/Off -->
<Label Text="{Loc 'apc-menu-breaker-label'}" HorizontalExpand="True" <Label Text="{Loc 'apc-menu-breaker-label'}" HorizontalExpand="True"
StyleClasses="StatusFieldTitle" MinWidth="120"/> StyleClasses="highlight" MinWidth="120"/>
<BoxContainer Orientation="Horizontal" MinWidth="90"> <BoxContainer Orientation="Horizontal" MinWidth="90">
<Button Name="BreakerButton" Text="{Loc 'apc-menu-breaker-button'}" HorizontalExpand="True" ToggleMode="True"/> <Button Name="BreakerButton" Text="{Loc 'apc-menu-breaker-button'}" HorizontalExpand="True" ToggleMode="True"/>
</BoxContainer> </BoxContainer>
<!--Charging Status--> <!--Charging Status-->
<Label Text="{Loc 'apc-menu-external-label'}" StyleClasses="StatusFieldTitle" MinWidth="120" /> <Label Text="{Loc 'apc-menu-external-label'}" StyleClasses="highlight" MinWidth="120" />
<Label Name="ExternalPowerStateLabel" Text="{Loc 'apc-menu-power-state-good'}" /> <Label Name="ExternalPowerStateLabel" Text="{Loc 'apc-menu-power-state-good'}" />
<!--Battery Power--> <!--Battery Power-->
<Label Text="{Loc 'apc-menu-power-label'}" StyleClasses="StatusFieldTitle" MinWidth="120" /> <Label Text="{Loc 'apc-menu-power-label'}" StyleClasses="highlight" MinWidth="120" />
<Label Name="PowerLabel"/> <Label Name="PowerLabel"/>
</GridContainer> </GridContainer>
</BoxContainer> </BoxContainer>

View File

@@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated; using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML; using Robust.Client.UserInterface.XAML;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
@@ -7,10 +7,6 @@ using System.Numerics;
using Content.Client.Stylesheets; using Content.Client.Stylesheets;
using Content.Shared.APC; using Content.Shared.APC;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.GameObjects;
using Robust.Shared.Localization;
using Robust.Shared.Maths;
using FancyWindow = Content.Client.UserInterface.Controls.FancyWindow; using FancyWindow = Content.Client.UserInterface.Controls.FancyWindow;
namespace Content.Client.Power.APC.UI namespace Content.Client.Power.APC.UI
@@ -44,7 +40,7 @@ namespace Content.Client.Power.APC.UI
if (PowerLabel != null) if (PowerLabel != null)
{ {
PowerLabel.Text = castState.Power + " W"; PowerLabel.Text = Loc.GetString("apc-menu-power-state-label-text", ("power", castState.Power));
} }
if (ExternalPowerStateLabel != null) if (ExternalPowerStateLabel != null)
@@ -53,15 +49,15 @@ namespace Content.Client.Power.APC.UI
{ {
case ApcExternalPowerState.None: case ApcExternalPowerState.None:
ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-none"); ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-none");
ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone); ExternalPowerStateLabel.SetOnlyStyleClass("negative");
break; break;
case ApcExternalPowerState.Low: case ApcExternalPowerState.Low:
ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-low"); ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-low");
ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateLow); ExternalPowerStateLabel.SetOnlyStyleClass("highlight");
break; break;
case ApcExternalPowerState.Good: case ApcExternalPowerState.Good:
ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-good"); ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-good");
ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood); ExternalPowerStateLabel.SetOnlyStyleClass("positive");
break; break;
default: default:
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();

View File

@@ -92,19 +92,19 @@ public sealed partial class GeneratorWindow : FancyWindow
if (starting) if (starting)
{ {
StatusLabel.Text = _loc.GetString("portable-generator-ui-status-starting"); StatusLabel.Text = _loc.GetString("portable-generator-ui-status-starting");
StatusLabel.SetOnlyStyleClass("Caution"); StatusLabel.SetOnlyStyleClass("negative");
StartProgress.Value = progress; StartProgress.Value = progress;
} }
else if (on) else if (on)
{ {
StatusLabel.Text = _loc.GetString("portable-generator-ui-status-running"); StatusLabel.Text = _loc.GetString("portable-generator-ui-status-running");
StatusLabel.SetOnlyStyleClass("Good"); StatusLabel.SetOnlyStyleClass("positive");
} }
else else
{ {
StatusLabel.Text = _loc.GetString("portable-generator-ui-status-stopped"); StatusLabel.Text = _loc.GetString("portable-generator-ui-status-stopped");
StatusLabel.SetOnlyStyleClass("Danger"); StatusLabel.SetOnlyStyleClass("highlight");
} }
var canSwitch = _entityManager.TryGetComponent(_entity, out PowerSwitchableComponent? switchable); var canSwitch = _entityManager.TryGetComponent(_entity, out PowerSwitchableComponent? switchable);
@@ -131,7 +131,7 @@ public sealed partial class GeneratorWindow : FancyWindow
("supply", netStats.Supply)); ("supply", netStats.Supply));
var good = netStats.Load <= netStats.Supply; var good = netStats.Load <= netStats.Supply;
NetworkStats.SetOnlyStyleClass(good ? "Good" : "Caution"); NetworkStats.SetOnlyStyleClass(good ? "positive" : "highlight");
} }
else else
{ {

View File

@@ -1,4 +1,4 @@
<controls:FancyWindow <controls:FancyWindow
xmlns="https://spacestation14.io" xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
MinSize="320 180" MinSize="320 180"
@@ -18,7 +18,7 @@
<Label <Label
Text="{Loc 'power-charge-window-power'}" Text="{Loc 'power-charge-window-power'}"
HorizontalExpand="True" HorizontalExpand="True"
StyleClasses="StatusFieldTitle" /> StyleClasses="highlight" />
<BoxContainer <BoxContainer
Orientation="Horizontal" Orientation="Horizontal"
@@ -49,21 +49,21 @@
<!-- Status --> <!-- Status -->
<Label <Label
Text="{Loc 'power-charge-window-status'}" Text="{Loc 'power-charge-window-status'}"
StyleClasses="StatusFieldTitle" /> StyleClasses="highlight" />
<Label Name="StatusLabel" <Label Name="StatusLabel"
Text="{Loc 'power-charge-window-status-fully-charged'}" /> Text="{Loc 'power-charge-window-status-fully-charged'}" />
<!-- ETA --> <!-- ETA -->
<Label <Label
Text="{Loc 'power-charge-window-eta'}" Text="{Loc 'power-charge-window-eta'}"
StyleClasses="StatusFieldTitle" /> StyleClasses="highlight" />
<Label Name="EtaLabel" <Label Name="EtaLabel"
Text="N/A" /> Text="N/A" />
<!-- Charge --> <!-- Charge -->
<Label <Label
Text="{Loc 'power-charge-window-charge'}" Text="{Loc 'power-charge-window-charge'}"
StyleClasses="StatusFieldTitle" /> StyleClasses="highlight" />
<ProgressBar Name="ChargeBar" <ProgressBar Name="ChargeBar"
MaxValue="255"> MaxValue="255">

View File

@@ -1,4 +1,5 @@
using Content.Client.UserInterface.Controls; using Content.Client.Stylesheets.Palette;
using Content.Client.UserInterface.Controls;
using Content.Shared.Power; using Content.Shared.Power;
using Robust.Client.AutoGenerated; using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;
@@ -41,7 +42,10 @@ public sealed partial class PowerChargeWindow : FancyWindow
("draw", state.PowerDraw), ("draw", state.PowerDraw),
("max", state.PowerDrawMax)); ("max", state.PowerDrawMax));
PowerLabel.SetOnlyStyleClass(MathHelper.CloseTo(state.PowerDraw, state.PowerDrawMax) ? "Good" : "Caution"); PowerLabel.FontColorOverride = MathHelper.CloseTo(state.PowerDraw, state.PowerDrawMax)
? Palettes.Status.Good
: Palettes.Status.Warning;
// TODO: blend with status colors instead of setting hard values
ChargeBar.Value = state.Charge; ChargeBar.Value = state.Charge;
ChargeText.Text = (state.Charge / 255f).ToString("P0"); ChargeText.Text = (state.Charge / 255f).ToString("P0");
@@ -54,12 +58,12 @@ public sealed partial class PowerChargeWindow : FancyWindow
_ => throw new ArgumentOutOfRangeException() _ => throw new ArgumentOutOfRangeException()
}); });
StatusLabel.SetOnlyStyleClass(state.PowerStatus switch StatusLabel.FontColorOverride = (state.PowerStatus switch
{ {
PowerChargePowerStatus.Off => "Danger", PowerChargePowerStatus.Off => Palettes.Status.Critical,
PowerChargePowerStatus.Discharging => "Caution", PowerChargePowerStatus.Discharging => Palettes.Status.Warning,
PowerChargePowerStatus.Charging => "Caution", PowerChargePowerStatus.Charging => Palettes.Status.Warning,
PowerChargePowerStatus.FullyCharged => "Good", PowerChargePowerStatus.FullyCharged => Palettes.Status.Good,
_ => throw new ArgumentOutOfRangeException() _ => throw new ArgumentOutOfRangeException()
}); });
@@ -67,6 +71,6 @@ public sealed partial class PowerChargeWindow : FancyWindow
? Loc.GetString("power-charge-window-eta-value", ("left", TimeSpan.FromSeconds(state.EtaSeconds))) ? Loc.GetString("power-charge-window-eta-value", ("left", TimeSpan.FromSeconds(state.EtaSeconds)))
: Loc.GetString("power-charge-window-eta-none"); : Loc.GetString("power-charge-window-eta-none");
EtaLabel.SetOnlyStyleClass(state.EtaSeconds >= 0 ? "Caution" : "Disabled"); EtaLabel.SetOnlyStyleClass(state.EtaSeconds >= 0 ? "highlight" : "LabelWeak");
} }
} }

View File

@@ -67,11 +67,11 @@
<!-- Power overview --> <!-- Power overview -->
<GridContainer Columns="2"> <GridContainer Columns="2">
<Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-sources'}"/> <Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-sources'}"/>
<Label Name="TotalSources" Text="?" Margin="10 0 0 0"/> <Label Name="TotalSources" Text="?" Margin="10 0 0 0"/>
<Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-battery-usage'}"/> <Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-battery-usage'}"/>
<Label Name="TotalBatteryUsage" Text="?" Margin="10 0 0 0"/> <Label Name="TotalBatteryUsage" Text="?" Margin="10 0 0 0"/>
<Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-loads'}"/> <Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-loads'}"/>
<Label Name="TotalLoads" Text="?" Margin="10 0 0 0"/> <Label Name="TotalLoads" Text="?" Margin="10 0 0 0"/>
</GridContainer> </GridContainer>

View File

@@ -85,10 +85,10 @@ public sealed partial class PowerMonitoringWindow
// Update button style // Update button style
if (netEntity == _focusEntity) if (netEntity == _focusEntity)
button.AddStyleClass(StyleNano.StyleClassButtonColorGreen); button.AddStyleClass(StyleClass.Positive);
else else
button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen); button.RemoveStyleClass(StyleClass.Positive);
// Update sprite // Update sprite
if (entry.MetaData.Value.SpritePath != string.Empty && entry.MetaData.Value.SpriteState != string.Empty) if (entry.MetaData.Value.SpritePath != string.Empty && entry.MetaData.Value.SpriteState != string.Empty)
@@ -185,7 +185,7 @@ public sealed partial class PowerMonitoringWindow
// Toggle off button? // Toggle off button?
if (entry.NetEntity == _focusEntity) if (entry.NetEntity == _focusEntity)
{ {
entry.Button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen); entry.Button.RemoveStyleClass(StyleClass.Positive);
_focusEntity = null; _focusEntity = null;
// Request an update from the power monitoring system // Request an update from the power monitoring system
@@ -195,7 +195,7 @@ public sealed partial class PowerMonitoringWindow
} }
// Otherwise, toggle on // Otherwise, toggle on
entry.Button.AddStyleClass(StyleNano.StyleClassButtonColorGreen); entry.Button.AddStyleClass(StyleClass.Positive);
ActivateAutoScrollToFocus(); ActivateAutoScrollToFocus();
@@ -206,7 +206,7 @@ public sealed partial class PowerMonitoringWindow
{ {
if (sibling.NetEntity == _focusEntity) if (sibling.NetEntity == _focusEntity)
{ {
sibling.Button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen); sibling.Button.RemoveStyleClass(StyleClass.Positive);
break; break;
} }
} }

View File

@@ -16,7 +16,7 @@ public sealed class GeigerItemControl : Control
public GeigerItemControl(GeigerComponent component) public GeigerItemControl(GeigerComponent component)
{ {
_component = component; _component = component;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
Update(); Update();

View File

@@ -18,7 +18,7 @@ public sealed class DoorRemoteStatusControl : Control
public DoorRemoteStatusControl(Entity<DoorRemoteComponent> entity) public DoorRemoteStatusControl(Entity<DoorRemoteComponent> entity)
{ {
_entity = entity; _entity = entity;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
} }

View File

@@ -2,12 +2,12 @@
xmlns:pllax="clr-namespace:Content.Client.Parallax"> xmlns:pllax="clr-namespace:Content.Client.Parallax">
<pllax:ParallaxControl SpeedX="20"/> <pllax:ParallaxControl SpeedX="20"/>
<Control HorizontalAlignment="Center" VerticalAlignment="Center"> <Control HorizontalAlignment="Center" VerticalAlignment="Center">
<PanelContainer StyleClasses="AngleRect" /> <PanelContainer StyleClasses="BackgroundPanel" />
<BoxContainer Orientation="Vertical" SetSize="800 600" Margin="2"> <BoxContainer Orientation="Vertical" SetSize="800 600" Margin="2">
<ScrollContainer Name="what" VerticalExpand="True" HScrollEnabled="False" Margin="0 0 0 2" ReturnMeasure="True"> <ScrollContainer Name="what" VerticalExpand="True" HScrollEnabled="False" Margin="0 0 0 2" ReturnMeasure="True">
<RichTextLabel Name="ReasonLabel" VerticalAlignment="Top" /> <RichTextLabel Name="ReasonLabel" VerticalAlignment="Top" />
</ScrollContainer> </ScrollContainer>
<Button Name="RetryButton" StyleClasses="Caution" Text="{Loc 'replay-loading-retry'}" Visible="False" /> <Button Name="RetryButton" StyleClasses="negative" Text="{Loc 'replay-loading-retry'}" Visible="False" />
<Button Name="CancelButton" Text="{Loc 'replay-loading-cancel'}" Visible="False" /> <Button Name="CancelButton" Text="{Loc 'replay-loading-cancel'}" Visible="False" />
</BoxContainer> </BoxContainer>
</Control> </Control>

View File

@@ -63,7 +63,7 @@ public sealed partial class RoboticsConsoleWindow : FancyWindow
}; };
// cant put multiple styles in xaml for some reason // cant put multiple styles in xaml for some reason
DestroyButton.StyleClasses.Add(StyleBase.ButtonCaution); DestroyButton.StyleClasses.Add(StyleClass.Negative);
} }
public void SetEntity(EntityUid uid) public void SetEntity(EntityUid uid)

View File

@@ -34,7 +34,7 @@ namespace Content.Client.RoundEnd
roundEndTabs.AddChild(MakeRoundEndSummaryTab(gm, roundEnd, roundTimeSpan, roundId)); roundEndTabs.AddChild(MakeRoundEndSummaryTab(gm, roundEnd, roundTimeSpan, roundId));
roundEndTabs.AddChild(MakePlayerManifestTab(info)); roundEndTabs.AddChild(MakePlayerManifestTab(info));
Contents.AddChild(roundEndTabs); ContentsContainer.AddChild(roundEndTabs);
OpenCenteredRight(); OpenCenteredRight();
MoveToFront(); MoveToFront();

View File

@@ -74,12 +74,12 @@ public sealed partial class OfferingWindowOption : PanelContainer
if (_claimed) if (_claimed)
{ {
ClaimButton.AddStyleClass(StyleBase.ButtonCaution); ClaimButton.AddStyleClass(StyleClass.Negative);
ClaimButton.Text = Loc.GetString("offering-window-claimed"); ClaimButton.Text = Loc.GetString("offering-window-claimed");
} }
else else
{ {
ClaimButton.RemoveStyleClass(StyleBase.ButtonCaution); ClaimButton.RemoveStyleClass(StyleClass.Negative);
ClaimButton.Text = Loc.GetString("offering-window-claim"); ClaimButton.Text = Loc.GetString("offering-window-claim");
} }
} }

View File

@@ -90,9 +90,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
offering.AddContent(new Label offering.AddContent(new Label
{ {
Text = difficultyProto.RecommendedPlayers.ToString(), Text = difficultyProto.RecommendedPlayers.ToString(),
FontColorOverride = StyleNano.NanoGold,
HorizontalAlignment = Control.HAlignment.Left, HorizontalAlignment = Control.HAlignment.Left,
Margin = new Thickness(0f, 0f, 0f, 5f), Margin = new Thickness(0f, 0f, 0f, 5f),
StyleClasses = { StyleClass.LabelKeyText },
}); });
// Details // Details
@@ -108,9 +108,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description)) Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description))
? LogAndReturnDefaultFactionDescription(faction) ? LogAndReturnDefaultFactionDescription(faction)
: Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description), : Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description),
FontColorOverride = StyleNano.NanoGold,
HorizontalAlignment = Control.HAlignment.Left, HorizontalAlignment = Control.HAlignment.Left,
Margin = new Thickness(0f, 0f, 0f, 5f), Margin = new Thickness(0f, 0f, 0f, 5f),
StyleClasses = { StyleClass.LabelKeyText },
}); });
string LogAndReturnDefaultFactionDescription(string faction) string LogAndReturnDefaultFactionDescription(string faction)
@@ -129,9 +129,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
offering.AddContent(new Label offering.AddContent(new Label
{ {
Text = mission.Duration.ToString(), Text = mission.Duration.ToString(),
FontColorOverride = StyleNano.NanoGold,
HorizontalAlignment = Control.HAlignment.Left, HorizontalAlignment = Control.HAlignment.Left,
Margin = new Thickness(0f, 0f, 0f, 5f), Margin = new Thickness(0f, 0f, 0f, 5f),
StyleClasses = { StyleClass.LabelKeyText },
}); });
// Biome // Biome
@@ -147,9 +147,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description)) Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description))
? LogAndReturnDefaultBiomDescription(biome) ? LogAndReturnDefaultBiomDescription(biome)
: Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description), : Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description),
FontColorOverride = StyleNano.NanoGold,
HorizontalAlignment = Control.HAlignment.Left, HorizontalAlignment = Control.HAlignment.Left,
Margin = new Thickness(0f, 0f, 0f, 5f), Margin = new Thickness(0f, 0f, 0f, 5f),
StyleClasses = { StyleClass.LabelKeyText },
}); });
string LogAndReturnDefaultBiomDescription(string biome) string LogAndReturnDefaultBiomDescription(string biome)
@@ -169,9 +169,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
offering.AddContent(new Label offering.AddContent(new Label
{ {
Text = string.Join("\n", mods.Select(o => "- " + o)).TrimEnd(), Text = string.Join("\n", mods.Select(o => "- " + o)).TrimEnd(),
FontColorOverride = StyleNano.NanoGold,
HorizontalAlignment = Control.HAlignment.Left, HorizontalAlignment = Control.HAlignment.Left,
Margin = new Thickness(0f, 0f, 0f, 5f), Margin = new Thickness(0f, 0f, 0f, 5f),
StyleClasses = { StyleClass.LabelKeyText },
}); });
offering.ClaimPressed += args => offering.ClaimPressed += args =>

View File

@@ -133,13 +133,13 @@ public sealed partial class SensorMonitoringWindow : FancyWindow, IComputerWindo
foreach (var sensor in _sensorData.Values) foreach (var sensor in _sensorData.Values)
{ {
var labelName = new Label { Text = sensor.Name, StyleClasses = { StyleBase.StyleClassLabelHeading } }; var labelName = new Label { Text = sensor.Name, StyleClasses = { StyleClass.LabelHeading } };
var labelAddress = new Label var labelAddress = new Label
{ {
Text = sensor.Address, Text = sensor.Address,
Margin = new Thickness(4, 0), Margin = new Thickness(4, 0),
VerticalAlignment = VAlignment.Bottom, VerticalAlignment = VAlignment.Bottom,
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor } StyleClasses = { StyleClass.LabelWeak }
}; };
Asdf.AddChild(new BoxContainer Asdf.AddChild(new BoxContainer
@@ -163,13 +163,13 @@ public sealed partial class SensorMonitoringWindow : FancyWindow, IComputerWindo
Orientation = BoxContainer.LayoutOrientation.Horizontal, Orientation = BoxContainer.LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label { Text = stream.Name, StyleClasses = { "monospace" }, HorizontalExpand = true }, new Label { Text = stream.Name, StyleClasses = { "Monospace" }, HorizontalExpand = true },
new Label { Text = FormatValue(stream.Unit, lastSample.Value) } new Label { Text = FormatValue(stream.Unit, lastSample.Value) }
} }
}); });
Asdf.AddChild(new GraphView(stream.Samples, startTime, curTime, maxValue * 1.1f, this) { MinHeight = 150 }); Asdf.AddChild(new GraphView(stream.Samples, startTime, curTime, maxValue * 1.1f, this) { MinHeight = 150 });
Asdf.AddChild(new PanelContainer { StyleClasses = { StyleBase.ClassLowDivider } }); Asdf.AddChild(new PanelContainer { StyleClasses = { StyleClass.LowDivider } });
} }
} }
} }

View File

@@ -4,13 +4,13 @@
MinSize="200 200"> MinSize="200 200">
<BoxContainer Orientation="Vertical" HorizontalExpand="True"> <BoxContainer Orientation="Vertical" HorizontalExpand="True">
<GridContainer Margin="4 0 0 0" Columns="2"> <GridContainer Margin="4 0 0 0" Columns="2">
<Label Name="ShowIFFLabel" Text="{Loc 'iff-console-show-iff-label'}" HorizontalExpand="True" StyleClasses="StatusFieldTitle" /> <Label Name="ShowIFFLabel" Text="{Loc 'iff-console-show-iff-label'}" HorizontalExpand="True" StyleClasses="highlight" />
<BoxContainer Orientation="Horizontal" MinWidth="120"> <BoxContainer Orientation="Horizontal" MinWidth="120">
<Button Name="ShowIFFOnButton" Text="{Loc 'iff-console-on'}" StyleClasses="OpenRight" /> <Button Name="ShowIFFOnButton" Text="{Loc 'iff-console-on'}" StyleClasses="OpenRight" />
<Button Name="ShowIFFOffButton" Text="{Loc 'iff-console-off'}" StyleClasses="OpenLeft" /> <Button Name="ShowIFFOffButton" Text="{Loc 'iff-console-off'}" StyleClasses="OpenLeft" />
</BoxContainer> </BoxContainer>
<Label Name="ShowVesselLabel" Text="{Loc 'iff-console-show-vessel-label'}" HorizontalExpand="True" StyleClasses="StatusFieldTitle" /> <Label Name="ShowVesselLabel" Text="{Loc 'iff-console-show-vessel-label'}" HorizontalExpand="True" StyleClasses="highlight" />
<BoxContainer Orientation="Horizontal" MinWidth="120"> <BoxContainer Orientation="Horizontal" MinWidth="120">
<Button Name="ShowVesselOnButton" Text="{Loc 'iff-console-on'}" StyleClasses="OpenRight" /> <Button Name="ShowVesselOnButton" Text="{Loc 'iff-console-on'}" StyleClasses="OpenRight" />
<Button Name="ShowVesselOffButton" Text="{Loc 'iff-console-off'}" StyleClasses="OpenLeft" /> <Button Name="ShowVesselOffButton" Text="{Loc 'iff-console-off'}" StyleClasses="OpenLeft" />

View File

@@ -102,14 +102,14 @@ public sealed partial class BorgMenu : FancyWindow
BrainView.Visible = true; BrainView.Visible = true;
BrainView.SetEntity(brain); BrainView.SetEntity(brain);
BrainButton.Disabled = false; BrainButton.Disabled = false;
BrainButton.AddStyleClass(StyleBase.ButtonOpenLeft); BrainButton.AddStyleClass(StyleClass.ButtonOpenLeft);
} }
else else
{ {
BrainButton.Text = Loc.GetString("borg-ui-no-brain"); BrainButton.Text = Loc.GetString("borg-ui-no-brain");
BrainButton.Disabled = true; BrainButton.Disabled = true;
BrainView.Visible = false; BrainView.Visible = false;
BrainButton.RemoveStyleClass(StyleBase.ButtonOpenLeft); BrainButton.RemoveStyleClass(StyleClass.ButtonOpenLeft);
} }
} }

View File

@@ -1,6 +1,6 @@
<PanelContainer xmlns="https://spacestation14.io" <PanelContainer xmlns="https://spacestation14.io"
HorizontalExpand="True" HorizontalExpand="True"
StyleClasses="PanelBackgroundLight" StyleClasses="PanelLight"
Margin="5 5 5 0"> Margin="5 5 5 0">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" Margin="5 5 0 5"> <BoxContainer Orientation="Horizontal" HorizontalExpand="True" Margin="5 5 0 5">
<SpriteView Name="ModuleView" Margin="0 0 5 0"/> <SpriteView Name="ModuleView" Margin="0 0 5 0"/>

View File

@@ -10,7 +10,7 @@
<customControls:HSeparator Margin="0 5 0 5"/> <customControls:HSeparator Margin="0 5 0 5"/>
<RichTextLabel Name="LawLabel"/> <RichTextLabel Name="LawLabel"/>
<BoxContainer Name="LawAnnouncementButtons" Orientation="Horizontal" HorizontalExpand="True" Margin="0 5 0 0"> <BoxContainer Name="LawAnnouncementButtons" Orientation="Horizontal" HorizontalExpand="True" Margin="0 5 0 0">
<Label Text="{Loc laws-ui-state-law}" StyleClasses="StatusFieldTitle"/> <Label Text="{Loc laws-ui-state-law}" StyleClasses="highlight"/>
<Control Margin="5 0 0 0" /> <Control Margin="5 0 0 0" />
<!-- Buttons are added via C# code--> <!-- Buttons are added via C# code-->
</BoxContainer> </BoxContainer>

View File

@@ -97,7 +97,7 @@ public sealed class SprayPainterSystem : SharedSprayPainterSystem
public StatusControl(Entity<SprayPainterComponent> ent) public StatusControl(Entity<SprayPainterComponent> ent)
{ {
_entity = ent; _entity = ent;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
} }

View File

@@ -15,7 +15,7 @@ public sealed class StackStatusControl : Control
public StackStatusControl(StackComponent parent) public StackStatusControl(StackComponent parent)
{ {
_parent = parent; _parent = parent;
_label = new RichTextLabel {StyleClasses = {StyleNano.StyleClassItemStatus}}; _label = new RichTextLabel {StyleClasses = {StyleClass.ItemStatus}};
_label.SetMarkup(Loc.GetString("comp-stack-status", ("count", _parent.Count))); _label.SetMarkup(Loc.GetString("comp-stack-status", ("count", _parent.Count)));
AddChild(_label); AddChild(_label);
} }

Some files were not shown because too many files have changed in this diff Show More