diff --git a/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs b/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs index 209c58c950..ea96b13376 100644 --- a/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs +++ b/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs @@ -9,6 +9,7 @@ using Robust.Client.UserInterface.XAML; using Robust.Shared.Prototypes; using System.Numerics; using System.Linq; +using Content.Client.Stylesheets; 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)); foreach (var jobIcon in icons) { - String styleBase = StyleBase.ButtonOpenBoth; + String styleBase = StyleClass.ButtonOpenBoth; var modulo = i % JobIconColumnCount; if (modulo == 0) - styleBase = StyleBase.ButtonOpenRight; + styleBase = StyleClass.ButtonOpenRight; else if (modulo == JobIconColumnCount - 1) - styleBase = StyleBase.ButtonOpenLeft; + styleBase = StyleClass.ButtonOpenLeft; // Generate buttons var jobIconButton = new Button diff --git a/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs b/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs index 7af78d9e5f..2a85530c48 100644 --- a/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs +++ b/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs @@ -119,11 +119,11 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer if (_groupedAccessLevels.Count > 1) { if (AccessGroupList.ChildCount == 0) - accessGroupButton.AddStyleClass(StyleBase.ButtonOpenLeft); + accessGroupButton.AddStyleClass(StyleClass.ButtonOpenLeft); else if (_groupedAccessLevels.Count > 1 && AccessGroupList.ChildCount == (_groupedAccessLevels.Count - 1)) - accessGroupButton.AddStyleClass(StyleBase.ButtonOpenRight); + accessGroupButton.AddStyleClass(StyleClass.ButtonOpenRight); else - accessGroupButton.AddStyleClass(StyleBase.ButtonOpenBoth); + accessGroupButton.AddStyleClass(StyleClass.ButtonOpenBoth); } accessGroupButton.Pressed = _accessGroupTabIndex == orderedAccessGroups.IndexOf(accessGroup); diff --git a/Content.Client/Actions/UI/ActionAlertTooltip.cs b/Content.Client/Actions/UI/ActionAlertTooltip.cs index 664a67b406..065c16d61b 100644 --- a/Content.Client/Actions/UI/ActionAlertTooltip.cs +++ b/Content.Client/Actions/UI/ActionAlertTooltip.cs @@ -23,9 +23,10 @@ namespace Content.Client.Actions.UI public ActionAlertTooltip(FormattedMessage name, FormattedMessage? desc, string? requires = null) { + Stylesheet = IoCManager.Resolve().SheetSystem; _gameTiming = IoCManager.Resolve(); - SetOnlyStyleClass(StyleNano.StyleClassTooltipPanel); + SetOnlyStyleClass(StyleClass.TooltipPanel); BoxContainer vbox; AddChild(vbox = new BoxContainer @@ -36,7 +37,7 @@ namespace Content.Client.Actions.UI var nameLabel = new RichTextLabel { MaxWidth = TooltipTextMaxWidth, - StyleClasses = {StyleNano.StyleClassTooltipActionTitle} + StyleClasses = { StyleClass.TooltipTitle } }; nameLabel.SetMessage(name); vbox.AddChild(nameLabel); @@ -46,7 +47,7 @@ namespace Content.Client.Actions.UI var description = new RichTextLabel { MaxWidth = TooltipTextMaxWidth, - StyleClasses = {StyleNano.StyleClassTooltipActionDescription} + StyleClasses = { StyleClass.TooltipDesc } }; description.SetMessage(desc); vbox.AddChild(description); @@ -55,7 +56,7 @@ namespace Content.Client.Actions.UI vbox.AddChild(_cooldownLabel = new RichTextLabel { MaxWidth = TooltipTextMaxWidth, - StyleClasses = {StyleNano.StyleClassTooltipActionCooldown}, + StyleClasses = { StyleClass.TooltipDesc }, Visible = false }); @@ -64,7 +65,7 @@ namespace Content.Client.Actions.UI var requiresLabel = new RichTextLabel { MaxWidth = TooltipTextMaxWidth, - StyleClasses = {StyleNano.StyleClassTooltipActionRequirements} + StyleClasses = { StyleClass.TooltipDesc } }; if (!FormattedMessage.TryFromMarkup("[color=#635c5c]" + requires + "[/color]", out var markup)) diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml index cc5207bb3a..bfe6b31c28 100644 --- a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml +++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml @@ -7,7 +7,7 @@ - + diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs index 148cbf4e18..7870dae7b2 100644 --- a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs +++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs @@ -12,17 +12,19 @@ namespace Content.Client.Administration.UI.AdminRemarks; [GenerateTypedNameReferences] public sealed partial class AdminMessagePopupWindow : Control { + [Dependency] private readonly IStylesheetManager _styleMan = default!; + private float _timer = float.MaxValue; public event Action? OnDismissPressed; - public event Action? OnAcceptPressed; public AdminMessagePopupWindow() { RobustXamlLoader.Load(this); + IoCManager.InjectDependencies(this); - Stylesheet = IoCManager.Resolve().SheetSpace; + Stylesheet = _styleMan.SheetSystem; AcceptButton.OnPressed += OnAcceptButtonPressed; DismissButton.OnPressed += OnDismissButtonPressed; @@ -49,7 +51,8 @@ public sealed partial class AdminMessagePopupWindow : Control 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) diff --git a/Content.Client/Administration/UI/PermissionsEui.cs b/Content.Client/Administration/UI/PermissionsEui.cs index fe1237d4c9..96b53babb5 100644 --- a/Content.Client/Administration/UI/PermissionsEui.cs +++ b/Content.Client/Administration/UI/PermissionsEui.cs @@ -27,7 +27,7 @@ namespace Content.Client.Administration.UI [Dependency] private readonly IClientAdminManager _adminManager = default!; private readonly Menu _menu; - private readonly List _subWindows = new(); + private readonly List _subWindows = new(); private Dictionary _ranks = 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() }; if (admin.Title == null) // none { - titleControl.StyleClasses.Add(StyleBase.StyleClassItalic); + titleControl.StyleClasses.Add(StyleClass.Italic); } al.AddChild(titleControl); @@ -240,7 +240,7 @@ namespace Content.Client.Administration.UI var rankControl = new Label { Text = rank }; if (italic) { - rankControl.StyleClasses.Add(StyleBase.StyleClassItalic); + rankControl.StyleClasses.Add(StyleClass.Italic); } al.AddChild(rankControl); @@ -340,10 +340,9 @@ namespace Content.Client.Administration.UI tab.AddChild(adminVBox); 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 @@ -419,21 +418,21 @@ namespace Content.Client.Administration.UI var inherit = new Button { Text = "I", - StyleClasses = { StyleBase.ButtonOpenRight }, + StyleClasses = { StyleClass.ButtonOpenRight }, Disabled = disable, Group = group, }; var sub = new Button { Text = "-", - StyleClasses = { StyleBase.ButtonOpenBoth }, + StyleClasses = { StyleClass.ButtonOpenBoth }, Disabled = disable, Group = group }; var plus = new Button { Text = "+", - StyleClasses = { StyleBase.ButtonOpenLeft }, + StyleClasses = { StyleClass.ButtonOpenLeft }, Disabled = disable, Group = group }; @@ -479,7 +478,7 @@ namespace Content.Client.Administration.UI bottomButtons.AddChild(SaveButton); - Contents.AddChild(new BoxContainer + ContentsContainer.AddChild(new BoxContainer { Orientation = LayoutOrientation.Vertical, Children = @@ -605,7 +604,7 @@ namespace Content.Client.Administration.UI bottomButtons.AddChild(SaveButton); - Contents.AddChild(new BoxContainer + ContentsContainer.AddChild(new BoxContainer { Orientation = LayoutOrientation.Vertical, Children = diff --git a/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml b/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml index 9784b34557..88df194ecb 100644 --- a/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml +++ b/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml @@ -14,7 +14,7 @@ VerticalExpand="True" Margin="0 0 0 0" VerticalAlignment="Center"> - - - + + OnPlayerAction?.Invoke(SharedSpaceVillainArcadeComponent.PlayerAction.NewGame); grid.AddChild(newGame); - Contents.AddChild(grid); + ContentsContainer.AddChild(grid); } private void UpdateMetadata(SharedSpaceVillainArcadeComponent.SpaceVillainArcadeMetaDataUpdateMessage message) diff --git a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs index 64680b5321..60e06e98ce 100644 --- a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs +++ b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs @@ -1,6 +1,6 @@ using Content.Client.Atmos.Monitor.UI.Widgets; using Content.Client.Message; -using Content.Client.Stylesheets; +using Content.Client.Stylesheets.Palette; using Content.Client.UserInterface.Controls; using Content.Shared.Atmos; using Content.Shared.Atmos.Monitor; @@ -17,7 +17,7 @@ namespace Content.Client.Atmos.Monitor.UI; public sealed partial class AirAlarmWindow : FancyWindow { public event Action? AtmosDeviceDataChanged; - public event Action? AtmosDeviceDataCopied; + public event Action? AtmosDeviceDataCopied; public event Action? AtmosAlarmThresholdChanged; public event Action? AirAlarmModeChanged; public event Action? AutoModeChanged; @@ -131,7 +131,7 @@ public sealed partial class AirAlarmWindow : FancyWindow case GasVentPumpData pump: if (!_pumps.TryGetValue(addr, out var pumpControl)) { - var control= new PumpControl(pump, addr); + var control = new PumpControl(pump, addr); control.PumpDataChanged += AtmosDeviceDataChanged; control.PumpDataCopied += AtmosDeviceDataCopied; _pumps.Add(addr, control); @@ -186,11 +186,9 @@ public sealed partial class AirAlarmWindow : FancyWindow { return curAlarm switch { - AtmosAlarmType.Danger => StyleNano.DangerousRedFore, - AtmosAlarmType.Warning => StyleNano.ConcerningOrangeFore, - _ => StyleNano.GoodGreenFore, + AtmosAlarmType.Danger => Palettes.Status.Critical, + AtmosAlarmType.Warning => Palettes.Status.Warning, + _ => Palettes.Status.Good, }; } - - } diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs index 38c631e630..f4b31fd95b 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs +++ b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs @@ -1,3 +1,4 @@ +using Content.Client.Stylesheets; using Content.Shared.Atmos.Monitor; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.Controls; @@ -42,11 +43,11 @@ public sealed partial class ThresholdBoundControl : BoxContainer if (enabled) { - CBoundLabel.RemoveStyleClass("Disabled"); + CBoundLabel.RemoveStyleClass(StyleClass.LabelWeak); } else { - CBoundLabel.SetOnlyStyleClass("Disabled"); + CBoundLabel.SetOnlyStyleClass(StyleClass.LabelWeak); } } diff --git a/Content.Client/Atmos/UI/GasCanisterWindow.xaml b/Content.Client/Atmos/UI/GasCanisterWindow.xaml index f76e32a31d..3c7647385a 100644 --- a/Content.Client/Atmos/UI/GasCanisterWindow.xaml +++ b/Content.Client/Atmos/UI/GasCanisterWindow.xaml @@ -4,7 +4,7 @@ MinSize="480 400" Title="Canister"> -