diff --git a/BuildChecker/git_helper.py b/BuildChecker/git_helper.py
index 66d2463669..bd6603bd34 100644
--- a/BuildChecker/git_helper.py
+++ b/BuildChecker/git_helper.py
@@ -13,7 +13,7 @@ from typing import List
SOLUTION_PATH = Path("..") / "SpaceStation14.sln"
# If this doesn't match the saved version we overwrite them all.
-CURRENT_HOOKS_VERSION = "3"
+CURRENT_HOOKS_VERSION = "4"
QUIET = len(sys.argv) == 2 and sys.argv[1] == "--quiet"
diff --git a/BuildChecker/hooks/post-checkout b/BuildChecker/hooks/post-checkout
index ee4309de1d..1b91112ff0 100755
--- a/BuildChecker/hooks/post-checkout
+++ b/BuildChecker/hooks/post-checkout
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
gitroot=$(git rev-parse --show-toplevel)
diff --git a/BuildChecker/hooks/post-merge b/BuildChecker/hooks/post-merge
index 5cf3d91120..864a9cff50 100755
--- a/BuildChecker/hooks/post-merge
+++ b/BuildChecker/hooks/post-merge
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Just call post-checkout since it does the same thing.
gitroot=$(git rev-parse --git-path hooks)
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/Access/UI/IdCardConsoleWindow.xaml b/Content.Client/Access/UI/IdCardConsoleWindow.xaml
index a2f5f3382b..0a695a3dce 100644
--- a/Content.Client/Access/UI/IdCardConsoleWindow.xaml
+++ b/Content.Client/Access/UI/IdCardConsoleWindow.xaml
@@ -1,6 +1,7 @@
+
@@ -16,6 +17,7 @@
+
@@ -26,10 +28,19 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs b/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
index 202653f700..30a7d969b6 100644
--- a/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
+++ b/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
@@ -79,6 +79,18 @@ namespace Content.Client.Access.UI
JobPresetOptionButton.AddItem(Loc.GetString(job.Name), _jobPrototypeIds.Count - 1);
}
+ SelectAllButton.OnPressed += _ =>
+ {
+ SetAllAccess(true);
+ SubmitData();
+ };
+
+ DeselectAllButton.OnPressed += _ =>
+ {
+ SetAllAccess(false);
+ SubmitData();
+ };
+
JobPresetOptionButton.OnItemSelected += SelectJobPreset;
_accessButtons.Populate(accessLevels, prototypeManager);
AccessLevelControlContainer.AddChild(_accessButtons);
@@ -89,14 +101,13 @@ namespace Content.Client.Access.UI
}
}
- private void ClearAllAccess()
+ /// If true, every individual access button will be pressed. If false, each will be depressed.
+ private void SetAllAccess(bool enabled)
{
foreach (var button in _accessButtons.ButtonsList.Values)
{
- if (button.Pressed)
- {
- button.Pressed = false;
- }
+ if (!button.Disabled && button.Pressed != enabled)
+ button.Pressed = enabled;
}
}
@@ -110,7 +121,7 @@ namespace Content.Client.Access.UI
JobTitleLineEdit.Text = Loc.GetString(job.Name);
args.Button.SelectId(args.Id);
- ClearAllAccess();
+ SetAllAccess(false);
// this is a sussy way to do this
foreach (var access in job.Access)
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/BanPanel/BanPanel.xaml.cs b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
index d20c741673..7566942506 100644
--- a/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
+++ b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
@@ -226,7 +226,7 @@ public sealed partial class BanPanel : DefaultWindow
var roleGroupCheckbox = new Button
{
Name = $"{groupName}GroupCheckbox",
- Text = "Ban all",
+ Text = Loc.GetString("role-bans-ban-group"),
Margin = new Thickness(0, 0, 5, 0),
ToggleMode = true,
};
@@ -391,7 +391,7 @@ public sealed partial class BanPanel : DefaultWindow
TimeLine.Text = args.Text;
if (!double.TryParse(args.Text, out var result))
{
- ExpiresLabel.Text = "err";
+ ExpiresLabel.Text = Loc.GetString("ban-panel-expiry-error");
ErrorLevel |= ErrorLevelEnum.Minutes;
TimeLine.ModulateSelfOverride = Color.Red;
UpdateSubmitEnabled();
diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml
index 2c27fdd2ce..fdaa838201 100644
--- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml
+++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml
@@ -18,7 +18,7 @@
-
+
diff --git a/Content.Client/Administration/UI/Logs/AdminLogsEui.cs b/Content.Client/Administration/UI/Logs/AdminLogsEui.cs
index 1544b827ae..28aca23f75 100644
--- a/Content.Client/Administration/UI/Logs/AdminLogsEui.cs
+++ b/Content.Client/Administration/UI/Logs/AdminLogsEui.cs
@@ -166,7 +166,7 @@ public sealed class AdminLogsEui : BaseEui
ClydeWindow = _clyde.CreateWindow(new WindowCreateParameters
{
Maximized = false,
- Title = "Admin Logs",
+ Title = Loc.GetString("admin-logs-title"),
Monitor = monitor,
Width = 1100,
Height = 400
diff --git a/Content.Client/Administration/UI/Notes/AdminNotesControl.xaml b/Content.Client/Administration/UI/Notes/AdminNotesControl.xaml
index 326e4bf3a3..09d36af1b0 100644
--- a/Content.Client/Administration/UI/Notes/AdminNotesControl.xaml
+++ b/Content.Client/Administration/UI/Notes/AdminNotesControl.xaml
@@ -5,7 +5,7 @@
-
+
diff --git a/Content.Client/Administration/UI/Notes/NoteEdit.xaml b/Content.Client/Administration/UI/Notes/NoteEdit.xaml
index 72b2c55ce8..793d84113d 100644
--- a/Content.Client/Administration/UI/Notes/NoteEdit.xaml
+++ b/Content.Client/Administration/UI/Notes/NoteEdit.xaml
@@ -3,7 +3,7 @@
Title="Loading..."
MinSize="400 200">
-
+
-
+
diff --git a/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs b/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
index c8e3afeb22..0c27d9d646 100644
--- a/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
+++ b/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
@@ -133,7 +133,7 @@ public sealed partial class NoteEdit : FancyWindow
private bool IsSecret { get; set; }
private NoteType NoteType { get; set; }
- private NoteSeverity? NoteSeverity
+ public NoteSeverity? NoteSeverity
{
get => _noteSeverity;
set
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/Administration/UI/Tabs/AdminTab/AdminTab.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml
index 0d4668d5bf..783d4c6106 100644
--- a/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml
+++ b/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml
@@ -7,10 +7,8 @@
MinSize="50 50">
-
-
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml
deleted file mode 100644
index 10718c25a5..0000000000
--- a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs
deleted file mode 100644
index 2216b6dfb0..0000000000
--- a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using Content.Shared.Administration;
-using JetBrains.Annotations;
-using Robust.Client.AutoGenerated;
-using Robust.Client.Console;
-using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
-using Robust.Client.UserInterface.XAML;
-using Robust.Shared.Utility;
-
-namespace Content.Client.Administration.UI.Tabs.AdminTab
-{
- [GenerateTypedNameReferences]
- [UsedImplicitly]
- public sealed partial class PlayerActionsWindow : DefaultWindow
- {
- private PlayerInfo? _selectedPlayer;
-
- public PlayerActionsWindow()
- {
- RobustXamlLoader.Load(this);
-
- SubmitKickButton.OnPressed += SubmitKickButtonOnPressed;
- SubmitAHelpButton.OnPressed += SubmitAhelpButtonOnPressed;
- SubmitRespawnButton.OnPressed += SubmitRespawnButtonOnPressed;
- PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
- }
-
- private void OnListOnOnSelectionChanged(PlayerInfo? obj)
- {
- _selectedPlayer = obj;
- var disableButtons = _selectedPlayer == null;
- SubmitKickButton.Disabled = disableButtons;
- SubmitAHelpButton.Disabled = disableButtons;
- SubmitRespawnButton.Disabled = disableButtons;
- }
-
- private void SubmitKickButtonOnPressed(BaseButton.ButtonEventArgs obj)
- {
- if (_selectedPlayer == null)
- return;
-
- IoCManager.Resolve().ExecuteCommand(
- $"kick \"{_selectedPlayer.Username}\" \"{CommandParsing.Escape(ReasonLine.Text)}\"");
- }
-
- private void SubmitAhelpButtonOnPressed(BaseButton.ButtonEventArgs obj)
- {
- if (_selectedPlayer == null)
- return;
-
- IoCManager.Resolve().ExecuteCommand(
- $"openahelp \"{_selectedPlayer.SessionId}\"");
- }
-
- private void SubmitRespawnButtonOnPressed(BaseButton.ButtonEventArgs obj)
- {
- if (_selectedPlayer == null)
- return;
-
- IoCManager.Resolve().ExecuteCommand(
- $"respawn \"{_selectedPlayer.Username}\"");
- }
- }
-}
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml
deleted file mode 100644
index cceb21f14d..0000000000
--- a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs
deleted file mode 100644
index 1978b5c3c0..0000000000
--- a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Content.Shared.Administration;
-using JetBrains.Annotations;
-using Robust.Client.AutoGenerated;
-using Robust.Client.Console;
-using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
-using Robust.Shared.IoC;
-
-namespace Content.Client.Administration.UI.Tabs.AdminTab
-{
- [GenerateTypedNameReferences]
- [UsedImplicitly]
- public sealed partial class TeleportWindow : DefaultWindow
- {
- private PlayerInfo? _selectedPlayer;
-
- protected override void EnteredTree()
- {
- SubmitButton.OnPressed += SubmitButtonOnOnPressed;
- PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
- }
-
- private void OnListOnOnSelectionChanged(PlayerInfo? obj)
- {
- _selectedPlayer = obj;
- SubmitButton.Disabled = _selectedPlayer == null;
- }
-
- private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
- {
- if (_selectedPlayer == null)
- return;
- // Execute command
- IoCManager.Resolve().ExecuteCommand(
- $"tpto \"{_selectedPlayer.Username}\"");
- }
- }
-}
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/AssemblyInfo.cs b/Content.Client/AssemblyInfo.cs
index 54b2cd50ac..513ab37ab2 100644
--- a/Content.Client/AssemblyInfo.cs
+++ b/Content.Client/AssemblyInfo.cs
@@ -1,3 +1,4 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Content.Tests")]
+[assembly: InternalsVisibleTo("Content.IntegrationTests")]
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">
-
+
@@ -16,7 +16,7 @@
-
+
@@ -29,7 +29,7 @@
-
+
diff --git a/Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml b/Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml
index 5acb142a60..3378dc7797 100644
--- a/Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml
+++ b/Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml
@@ -7,10 +7,7 @@
Orientation="Vertical"
HorizontalExpand="True"
Margin="0 0 0 5">
-
-
-
-
+
diff --git a/Content.Client/Bed/Cryostorage/CryostorageMenu.xaml b/Content.Client/Bed/Cryostorage/CryostorageMenu.xaml
index 5360cdb38e..b0f8d5cb0a 100644
--- a/Content.Client/Bed/Cryostorage/CryostorageMenu.xaml
+++ b/Content.Client/Bed/Cryostorage/CryostorageMenu.xaml
@@ -14,10 +14,8 @@
-
-
-
+ Margin="15"
+ StyleClasses="PanelDark">
diff --git a/Content.Client/Bql/ToolshedVisualizeWindow.xaml b/Content.Client/Bql/ToolshedVisualizeWindow.xaml
index 9affbf2181..b20d05b4f3 100644
--- a/Content.Client/Bql/ToolshedVisualizeWindow.xaml
+++ b/Content.Client/Bql/ToolshedVisualizeWindow.xaml
@@ -1,7 +1,7 @@
-
+
diff --git a/Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs b/Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs
index 55ee029a91..35a7524a6f 100644
--- a/Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs
+++ b/Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs
@@ -21,8 +21,6 @@ internal sealed partial class ToolshedVisualizeWindow : DefaultWindow
RobustXamlLoader.Load(this);
}
- protected override Vector2 ContentsMinimumSize => new(500, 700);
-
public void Update((string name, NetEntity entity)[] entities)
{
StatusLabel.Text = _loc.GetString("ui-bql-results-status", ("count", entities.Length));
diff --git a/Content.Client/Cargo/UI/BountyEntry.xaml b/Content.Client/Cargo/UI/BountyEntry.xaml
index 7c61323bd5..99874cf1a5 100644
--- a/Content.Client/Cargo/UI/BountyEntry.xaml
+++ b/Content.Client/Cargo/UI/BountyEntry.xaml
@@ -3,7 +3,7 @@
Margin="10 10 10 0"
HorizontalExpand="True"
Visible="True">
-
+
diff --git a/Content.Client/Changeling/UI/ChangelingTransformBoundUserInterface.cs b/Content.Client/Changeling/UI/ChangelingTransformBoundUserInterface.cs
index 97c07dd8c9..64d809c0c5 100644
--- a/Content.Client/Changeling/UI/ChangelingTransformBoundUserInterface.cs
+++ b/Content.Client/Changeling/UI/ChangelingTransformBoundUserInterface.cs
@@ -1,4 +1,4 @@
-using Content.Client.Stylesheets;
+using Content.Client.Stylesheets.Palette;
using Content.Client.UserInterface.Controls;
using Content.Shared.Changeling.Components;
using Content.Shared.Changeling.Systems;
@@ -11,8 +11,8 @@ namespace Content.Client.Changeling.UI;
public sealed partial class ChangelingTransformBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
{
private SimpleRadialMenu? _menu;
- private static readonly Color SelectedOptionBackground = StyleNano.ButtonColorGoodDefault.WithAlpha(128);
- private static readonly Color SelectedOptionHoverBackground = StyleNano.ButtonColorGoodHovered.WithAlpha(128);
+ private static readonly Color SelectedOptionBackground = Palettes.Green.Element.WithAlpha(128);
+ private static readonly Color SelectedOptionHoverBackground = Palettes.Green.HoveredElement.WithAlpha(128);
protected override void Open()
{
diff --git a/Content.Client/Changelog/ChangelogButton.cs b/Content.Client/Changelog/ChangelogButton.cs
index 6e8862492c..8611866b0d 100644
--- a/Content.Client/Changelog/ChangelogButton.cs
+++ b/Content.Client/Changelog/ChangelogButton.cs
@@ -36,12 +36,12 @@ namespace Content.Client.Changelog
if (_changelogManager.NewChangelogEntries)
{
Text = Loc.GetString("changelog-button-new-entries");
- StyleClasses.Add(StyleBase.ButtonCaution);
+ StyleClasses.Add(StyleClass.Negative);
}
else
{
Text = Loc.GetString("changelog-button");
- StyleClasses.Remove(StyleBase.ButtonCaution);
+ StyleClasses.Remove(StyleClass.Negative);
}
}
}
diff --git a/Content.Client/Changelog/ChangelogTab.xaml.cs b/Content.Client/Changelog/ChangelogTab.xaml.cs
index 851ed20422..61ce509594 100644
--- a/Content.Client/Changelog/ChangelogTab.xaml.cs
+++ b/Content.Client/Changelog/ChangelogTab.xaml.cs
@@ -58,7 +58,7 @@ public sealed partial class ChangelogTab : Control
ChangelogBody.AddChild(new Label
{
Text = dayNice,
- StyleClasses = { StyleBase.StyleClassLabelHeading },
+ StyleClasses = { StyleClass.LabelHeading },
Margin = new Thickness(4, 6, 0, 0)
});
@@ -117,7 +117,7 @@ public sealed partial class ChangelogTab : Control
};
readDivider.AddChild(hBox);
- readDivider.AddChild(new PanelContainer { StyleClasses = { StyleBase.ClassLowDivider } });
+ readDivider.AddChild(new PanelContainer { StyleClasses = { StyleClass.LowDivider } });
ChangelogBody.AddChild(readDivider);
if (first)
diff --git a/Content.Client/Changelog/ChangelogWindow.xaml b/Content.Client/Changelog/ChangelogWindow.xaml
index 355452dbfa..8325de02b5 100644
--- a/Content.Client/Changelog/ChangelogWindow.xaml
+++ b/Content.Client/Changelog/ChangelogWindow.xaml
@@ -2,8 +2,9 @@
xmlns:ui="clr-namespace:Content.Client.Changelog"
Title="{Loc 'changelog-window-title'}"
MinSize="500 400"
- SetSize="500 400">
-
+ SetSize="500 400"
+ Stylesheet="Interface">
+
diff --git a/Content.Client/Changelog/ChangelogWindow.xaml.cs b/Content.Client/Changelog/ChangelogWindow.xaml.cs
index d8f560f151..801d0859c3 100644
--- a/Content.Client/Changelog/ChangelogWindow.xaml.cs
+++ b/Content.Client/Changelog/ChangelogWindow.xaml.cs
@@ -21,8 +21,7 @@ namespace Content.Client.Changelog
public ChangelogWindow()
{
RobustXamlLoader.Load(this);
- WindowTitle.AddStyleClass(StyleBase.StyleClassLabelHeading);
- Stylesheet = IoCManager.Resolve().SheetSpace;
+ WindowTitle.AddStyleClass(StyleClass.LabelHeading);
}
protected override void Opened()
diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml
index aca316f6b3..5bc640ab44 100644
--- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml
+++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml
@@ -33,8 +33,8 @@
+
-
@@ -82,7 +82,7 @@
-
+
@@ -112,9 +112,9 @@
-
+
-
+
@@ -122,7 +122,7 @@
-
+
diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
index 14b55066e9..d610f34b29 100644
--- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
+++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
@@ -53,14 +53,14 @@ namespace Content.Client.Chemistry.UI
{
// For every button decide which stylebase to have
// Every row has 10 buttons
- String styleBase = StyleBase.ButtonOpenBoth;
+ String styleBase = StyleClass.ButtonOpenBoth;
uint modulo = i % 10;
if (i > 0 && modulo == 0)
- styleBase = StyleBase.ButtonOpenRight;
+ styleBase = StyleClass.ButtonOpenRight;
else if (i > 0 && modulo == 9)
- styleBase = StyleBase.ButtonOpenLeft;
+ styleBase = StyleClass.ButtonOpenLeft;
else if (i == 0)
- styleBase = StyleBase.ButtonOpenRight;
+ styleBase = StyleClass.ButtonOpenRight;
// Generate buttons
PillTypeButtons[i] = new Button
@@ -113,16 +113,16 @@ namespace Content.Client.Chemistry.UI
var buttonConfigs = new (string text, ChemMasterReagentAmount amount, string styleClass)[]
{
- ("1", ChemMasterReagentAmount.U1, StyleBase.ButtonOpenBoth),
- ("5", ChemMasterReagentAmount.U5, StyleBase.ButtonOpenBoth),
- ("10", ChemMasterReagentAmount.U10, StyleBase.ButtonOpenBoth),
- ("15", ChemMasterReagentAmount.U15, StyleBase.ButtonOpenBoth),
- ("20", ChemMasterReagentAmount.U20, StyleBase.ButtonOpenBoth),
- ("25", ChemMasterReagentAmount.U25, StyleBase.ButtonOpenBoth),
- ("30", ChemMasterReagentAmount.U30, StyleBase.ButtonOpenBoth),
- ("50", ChemMasterReagentAmount.U50, StyleBase.ButtonOpenBoth),
- ("100", ChemMasterReagentAmount.U100, StyleBase.ButtonOpenBoth),
- (Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleBase.ButtonOpenLeft),
+ ("1", ChemMasterReagentAmount.U1, StyleClass.ButtonOpenBoth),
+ ("5", ChemMasterReagentAmount.U5, StyleClass.ButtonOpenBoth),
+ ("10", ChemMasterReagentAmount.U10, StyleClass.ButtonOpenBoth),
+ ("15", ChemMasterReagentAmount.U15, StyleClass.ButtonOpenBoth),
+ ("20", ChemMasterReagentAmount.U20, StyleClass.ButtonOpenBoth),
+ ("25", ChemMasterReagentAmount.U25, StyleClass.ButtonOpenBoth),
+ ("30", ChemMasterReagentAmount.U30, StyleClass.ButtonOpenBoth),
+ ("50", ChemMasterReagentAmount.U50, StyleClass.ButtonOpenBoth),
+ ("100", ChemMasterReagentAmount.U100, StyleClass.ButtonOpenBoth),
+ (Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleClass.ButtonOpenLeft),
};
var buttons = new List();
@@ -252,7 +252,7 @@ namespace Content.Client.Chemistry.UI
var bufferVol = new Label
{
Text = $"{state.BufferCurrentVolume}u",
- StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+ StyleClasses = { StyleClass.LabelWeak }
};
bufferHBox.AddChild(bufferVol);
@@ -321,7 +321,7 @@ namespace Content.Client.Chemistry.UI
new Label
{
Text = $"{info.CurrentVolume}/{info.MaxVolume}",
- StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+ StyleClasses = { StyleClass.LabelWeak }
}
}
});
@@ -376,7 +376,7 @@ namespace Content.Client.Chemistry.UI
new Label
{
Text = $"{quantity}u",
- StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+ StyleClasses = { StyleClass.LabelWeak }
},
// Padding
diff --git a/Content.Client/Chemistry/UI/HyposprayStatusControl.cs b/Content.Client/Chemistry/UI/HyposprayStatusControl.cs
index 37b6fb5ed8..a564bcefc6 100644
--- a/Content.Client/Chemistry/UI/HyposprayStatusControl.cs
+++ b/Content.Client/Chemistry/UI/HyposprayStatusControl.cs
@@ -23,7 +23,7 @@ public sealed class HyposprayStatusControl : Control
{
_parent = parent;
_solutionContainers = solutionContainers;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
}
diff --git a/Content.Client/Chemistry/UI/InjectorStatusControl.cs b/Content.Client/Chemistry/UI/InjectorStatusControl.cs
index 0358876b76..24f988bd35 100644
--- a/Content.Client/Chemistry/UI/InjectorStatusControl.cs
+++ b/Content.Client/Chemistry/UI/InjectorStatusControl.cs
@@ -24,7 +24,7 @@ public sealed class InjectorStatusControl : Control
{
_parent = parent;
_solutionContainers = solutionContainers;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
}
diff --git a/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs b/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs
index 2b64eed570..1b56a1b4ec 100644
--- a/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs
+++ b/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs
@@ -107,7 +107,7 @@ namespace Content.Client.Chemistry.UI
var quantityLabel = new Label
{
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", quantity)),
- StyleClasses = { StyleNano.StyleClassLabelSecondaryColor },
+ StyleClasses = { StyleClass.LabelWeak },
};
ContainerInfo.Children.Add(new BoxContainer
diff --git a/Content.Client/Chemistry/UI/SolutionStatusControl.cs b/Content.Client/Chemistry/UI/SolutionStatusControl.cs
index 1a33ffb0e1..8a551a262c 100644
--- a/Content.Client/Chemistry/UI/SolutionStatusControl.cs
+++ b/Content.Client/Chemistry/UI/SolutionStatusControl.cs
@@ -29,7 +29,7 @@ public sealed class SolutionStatusControl : PollingItemStatusControl
(OnCrayonHandleState);
- Subs.ItemStatus(ent => new StatusControl(ent));
- }
- private static void OnCrayonHandleState(EntityUid uid, CrayonComponent component, ref ComponentHandleState args)
- {
- if (args.Current is not CrayonComponentState state) return;
-
- component.Color = state.Color;
- component.SelectedState = state.State;
- component.Charges = state.Charges;
- component.Capacity = state.Capacity;
-
- component.UIUpdateNeeded = true;
+ Subs.ItemStatus(ent => new StatusControl(ent, _charges, _entityManager));
}
private sealed class StatusControl : Control
{
- private readonly CrayonComponent _parent;
+ private readonly Entity _crayon;
+ private readonly SharedChargesSystem _charges;
private readonly RichTextLabel _label;
+ private readonly int _capacity;
- public StatusControl(CrayonComponent parent)
+ public StatusControl(Entity crayon, SharedChargesSystem charges, EntityManager entityManage)
{
- _parent = parent;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _crayon = crayon;
+ _charges = charges;
+ _capacity = entityManage.GetComponent(_crayon.Owner).MaxCharges;
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
-
- parent.UIUpdateNeeded = true;
}
protected override void FrameUpdate(FrameEventArgs args)
{
base.FrameUpdate(args);
- if (!_parent.UIUpdateNeeded)
- {
- return;
- }
-
- _parent.UIUpdateNeeded = false;
_label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label",
- ("color",_parent.Color),
- ("state",_parent.SelectedState),
- ("charges", _parent.Charges),
- ("capacity",_parent.Capacity)));
+ ("color",_crayon.Comp.Color),
+ ("state",_crayon.Comp.SelectedState),
+ ("charges", _charges.GetCurrentCharges(_crayon.Owner)),
+ ("capacity", _capacity)));
}
}
}
diff --git a/Content.Client/Crayon/UI/CrayonWindow.xaml.cs b/Content.Client/Crayon/UI/CrayonWindow.xaml.cs
index f1ac5a79cb..166ba01832 100644
--- a/Content.Client/Crayon/UI/CrayonWindow.xaml.cs
+++ b/Content.Client/Crayon/UI/CrayonWindow.xaml.cs
@@ -137,7 +137,8 @@ namespace Content.Client.Crayon.UI
private void ButtonOnPressed(ButtonEventArgs obj)
{
- if (obj.Button.Name == null) return;
+ if (obj.Button.Name == null)
+ return;
_selected = obj.Button.Name;
_autoSelected = null;
diff --git a/Content.Client/Credits/CreditsWindow.xaml.cs b/Content.Client/Credits/CreditsWindow.xaml.cs
index 68418eb3c8..f34ff43afe 100644
--- a/Content.Client/Credits/CreditsWindow.xaml.cs
+++ b/Content.Client/Credits/CreditsWindow.xaml.cs
@@ -100,11 +100,11 @@ public sealed partial class CreditsWindow : DefaultWindow
var container = new BoxContainer { Orientation = LayoutOrientation.Horizontal };
- var previousPageButton = new Button { Text = "Previous Page" };
+ var previousPageButton = new Button { Text = Loc.GetString("credits-window-previous-page-button") };
previousPageButton.OnPressed +=
_ => PopulateAttributions(attributionsContainer, count - AttributionsSourcesPerPage);
- var nextPageButton = new Button { Text = "Next Page" };
+ var nextPageButton = new Button { Text = Loc.GetString("credits-window-next-page-button") };
nextPageButton.OnPressed +=
_ => PopulateAttributions(attributionsContainer, count + AttributionsSourcesPerPage);
@@ -258,7 +258,7 @@ public sealed partial class CreditsWindow : DefaultWindow
foreach (var entry in CreditsManager.GetLicenses(_resourceManager).OrderBy(p => p.Name))
{
licensesContainer.AddChild(new Label
- { StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = entry.Name });
+ { StyleClasses = { StyleClass.LabelHeading }, Text = entry.Name });
// We split these line by line because otherwise
// 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;
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));
@@ -347,7 +347,7 @@ public sealed partial class CreditsWindow : DefaultWindow
first = false;
ss14ContributorsContainer.AddChild(new Label
- { StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = title });
+ { StyleClasses = { StyleClass.LabelHeading }, Text = title });
var label = new RichTextLabel();
var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}");
diff --git a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
index 179304a978..f88fa07f5a 100644
--- a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
+++ b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
@@ -58,7 +58,7 @@
StyleClasses="LabelBig" />
-
"hud_incarcerated",
SecurityStatus.Discharged => "hud_discharged",
SecurityStatus.Suspected => "hud_suspected",
+ SecurityStatus.Hostile => "hud_hostile",
+ SecurityStatus.Eliminated => "hud_eliminated",
_ => "SecurityIconNone"
};
}
diff --git a/Content.Client/Damage/Systems/DamageOtherOnHitSystem.cs b/Content.Client/Damage/Systems/DamageOtherOnHitSystem.cs
new file mode 100644
index 0000000000..a78603c22c
--- /dev/null
+++ b/Content.Client/Damage/Systems/DamageOtherOnHitSystem.cs
@@ -0,0 +1,5 @@
+using Content.Shared.Damage.Systems;
+
+namespace Content.Client.Damage.Systems;
+
+public sealed class DamageOtherOnHitSystem : SharedDamageOtherOnHitSystem;
diff --git a/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs b/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs
index adeb451a07..873fb851b7 100644
--- a/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs
+++ b/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs
@@ -157,15 +157,12 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
{
var panelContainer = new PanelContainer
{
- PanelOverride = new StyleBoxFlat
- {
- BackgroundColor = StyleNano.ButtonColorDefault
- },
Children =
{
button
}
};
+ panelContainer.SetOnlyStyleClass(StyleClass.PanelLight);
Grid.AddChild(panelContainer);
}
else
diff --git a/Content.Client/Doors/DoorSystem.cs b/Content.Client/Doors/DoorSystem.cs
index ae9c7eda78..0f6537eead 100644
--- a/Content.Client/Doors/DoorSystem.cs
+++ b/Content.Client/Doors/DoorSystem.cs
@@ -68,7 +68,7 @@ public sealed class DoorSystem : SharedDoorSystem
{
new AnimationTrackSpriteFlick
{
- LayerKey = DoorVisualLayers.BaseUnlit,
+ LayerKey = DoorVisualLayers.BaseEmagging,
KeyFrames =
{
new AnimationTrackSpriteFlick.KeyFrame(comp.EmaggingSpriteState, 0f),
@@ -92,6 +92,10 @@ public sealed class DoorSystem : SharedDoorSystem
if (_animationSystem.HasRunningAnimation(entity, DoorComponent.AnimationKey))
_animationSystem.Stop(entity.Owner, DoorComponent.AnimationKey);
+ // We are checking beforehand since some doors may not have an emagging visual layer, and we don't want LayerSetVisible to throw an error.
+ if (_sprite.TryGetLayer(entity.Owner, DoorVisualLayers.BaseEmagging, out var _, false))
+ _sprite.LayerSetVisible(entity.Owner, DoorVisualLayers.BaseEmagging, state == DoorState.Emagging);
+
UpdateAppearanceForDoorState(entity, args.Sprite, state);
}
@@ -134,7 +138,9 @@ public sealed class DoorSystem : SharedDoorSystem
return;
case DoorState.Emagging:
- _animationSystem.Play(entity, (Animation)entity.Comp.EmaggingAnimation, DoorComponent.AnimationKey);
+ // We are checking beforehand since some doors may not have an emagging visual layer.
+ if (_sprite.TryGetLayer(entity.Owner, DoorVisualLayers.BaseEmagging, out var _, false))
+ _animationSystem.Play(entity, (Animation)entity.Comp.EmaggingAnimation, DoorComponent.AnimationKey);
return;
}
diff --git a/Content.Client/Drunk/DrunkOverlay.cs b/Content.Client/Drunk/DrunkOverlay.cs
index c806cdad66..692232776a 100644
--- a/Content.Client/Drunk/DrunkOverlay.cs
+++ b/Content.Client/Drunk/DrunkOverlay.cs
@@ -27,6 +27,15 @@ public sealed class DrunkOverlay : Overlay
private const float VisualThreshold = 10.0f;
private const float PowerDivisor = 250.0f;
+ ///
+ /// This is a magic number based on my person preference of how quickly the bloodloss effect should kick in.
+ /// It is entirely arbitrary, and you should change it if it sucks.
+ /// Honestly should be refactored to be based on amount of blood lost but that's out of scope for what I'm doing atm.
+ /// Also caps all booze visual effects to a max intensity of 100 seconds or 100 booze power.
+ ///
+ private const float MaxBoozePower = 100f;
+
+ private const float BoozePowerScale = 8f;
private float _visualScale = 0;
@@ -50,15 +59,9 @@ public sealed class DrunkOverlay : Overlay
var time = status.Item2;
- var power = SharedDrunkSystem.MagicNumber;
+ var power = time == null ? MaxBoozePower : (float) Math.Min((time - _timing.CurTime).Value.TotalSeconds, MaxBoozePower);
- if (time != null)
- {
- var curTime = _timing.CurTime;
- power = (float) (time - curTime).Value.TotalSeconds;
- }
-
- CurrentBoozePower += 8f * (power * 0.5f - CurrentBoozePower) * args.DeltaSeconds / (power+1);
+ CurrentBoozePower += BoozePowerScale * (power - CurrentBoozePower) * args.DeltaSeconds / (power+1);
}
protected override bool BeforeDraw(in OverlayDrawArgs args)
diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs
index 223652f3b9..d4fdfc41d4 100644
--- a/Content.Client/Entry/EntryPoint.cs
+++ b/Content.Client/Entry/EntryPoint.cs
@@ -154,12 +154,6 @@ namespace Content.Client.Entry
_configManager.SetCVar("interface.resolutionAutoScaleMinimum", 0.5f);
}
- public override void Shutdown()
- {
- base.Shutdown();
- _titleWindowManager.Shutdown();
- }
-
public override void PostInit()
{
base.PostInit();
diff --git a/Content.Client/Fax/UI/FaxWindow.xaml b/Content.Client/Fax/UI/FaxWindow.xaml
index 04b297ab92..4161c1e307 100644
--- a/Content.Client/Fax/UI/FaxWindow.xaml
+++ b/Content.Client/Fax/UI/FaxWindow.xaml
@@ -56,7 +56,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Scale="0.9 0.9"
- StyleClasses="Refresh" />
+ StyleClasses="RefreshButton" />
diff --git a/Content.Client/GPS/UI/HandheldGpsStatusControl.cs b/Content.Client/GPS/UI/HandheldGpsStatusControl.cs
index 57645e386e..2feca1f176 100644
--- a/Content.Client/GPS/UI/HandheldGpsStatusControl.cs
+++ b/Content.Client/GPS/UI/HandheldGpsStatusControl.cs
@@ -21,7 +21,7 @@ public sealed class HandheldGpsStatusControl : Control
_parent = parent;
_entMan = IoCManager.Resolve();
_transform = _entMan.System();
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
UpdateGpsDetails();
}
diff --git a/Content.Client/GameTicking/Managers/TitleWindowManager.cs b/Content.Client/GameTicking/Managers/TitleWindowManager.cs
index 18ce16f634..bc33e78411 100644
--- a/Content.Client/GameTicking/Managers/TitleWindowManager.cs
+++ b/Content.Client/GameTicking/Managers/TitleWindowManager.cs
@@ -15,48 +15,29 @@ public sealed class TitleWindowManager
public void Initialize()
{
- _cfg.OnValueChanged(CVars.GameHostName, OnHostnameChange, true);
- _cfg.OnValueChanged(CCVars.GameHostnameInTitlebar, OnHostnameTitleChange, true);
+ _cfg.OnValueChanged(CVars.GameHostName, _ => OnHostnameChange(), true);
+ _cfg.OnValueChanged(CCVars.GameHostnameInTitlebar, _ => OnHostnameChange(), true);
- _client.RunLevelChanged += OnRunLevelChangedChange;
+ _client.RunLevelChanged += (_, _) => OnHostnameChange();
}
- public void Shutdown()
- {
- _cfg.UnsubValueChanged(CVars.GameHostName, OnHostnameChange);
- _cfg.UnsubValueChanged(CCVars.GameHostnameInTitlebar, OnHostnameTitleChange);
- }
-
- private void OnHostnameChange(string hostname)
+ private void OnHostnameChange()
{
var defaultWindowTitle = _gameController.GameTitle();
- // Since the game assumes the server name is MyServer and that GameHostnameInTitlebar CCVar is true by default
- // Lets just... not show anything. This also is used to revert back to just the game title on disconnect.
- if (_client.RunLevel == ClientRunLevel.Initialize)
+ // When the client starts connecting, it will be using either the default hostname, or whatever hostname
+ // is set in its config file (aka the last server they connected to) until it receives the latest cvars.
+ // If they are not connected then we will not show anything other than the usual window title.
+ if (_client.RunLevel != ClientRunLevel.InGame)
{
_clyde.SetWindowTitle(defaultWindowTitle);
return;
}
- if (_cfg.GetCVar(CCVars.GameHostnameInTitlebar))
- // If you really dislike the dash I guess change it here
- _clyde.SetWindowTitle(hostname + " - " + defaultWindowTitle);
- else
- _clyde.SetWindowTitle(defaultWindowTitle);
- }
-
- // Clients by default assume game.hostname_in_titlebar is true
- // but we need to clear it as soon as we join and actually receive the servers preference on this.
- // This will ensure we rerun OnHostnameChange and set the correct title bar name.
- private void OnHostnameTitleChange(bool colonthree)
- {
- OnHostnameChange(_cfg.GetCVar(CVars.GameHostName));
- }
-
- // This is just used we can rerun the hostname change function when we disconnect to revert back to just the games title.
- private void OnRunLevelChangedChange(object? sender, RunLevelChangedEventArgs runLevelChangedEventArgs)
- {
- OnHostnameChange(_cfg.GetCVar(CVars.GameHostName));
+ _clyde.SetWindowTitle(
+ _cfg.GetCVar(CCVars.GameHostnameInTitlebar)
+ ? _cfg.GetCVar(CVars.GameHostName) + " - " + defaultWindowTitle
+ : defaultWindowTitle);
}
+ // You thought I would remove the :3 from this code? You were wrong.
}
diff --git a/Content.Client/Gateway/UI/GatewayWindow.xaml.cs b/Content.Client/Gateway/UI/GatewayWindow.xaml.cs
index 9fb7c339d3..4e4076d98c 100644
--- a/Content.Client/Gateway/UI/GatewayWindow.xaml.cs
+++ b/Content.Client/Gateway/UI/GatewayWindow.xaml.cs
@@ -159,7 +159,7 @@ public sealed partial class GatewayWindow : FancyWindow,
if (Pressable())
{
- openButton.AddStyleClass(StyleBase.ButtonCaution);
+ openButton.AddStyleClass(StyleClass.Negative);
}
var buttonContainer = new BoxContainer()
diff --git a/Content.Client/Ghost/UI/ReturnToBodyMenu.cs b/Content.Client/Ghost/UI/ReturnToBodyMenu.cs
index 69f04993c9..384ffb6be6 100644
--- a/Content.Client/Ghost/UI/ReturnToBodyMenu.cs
+++ b/Content.Client/Ghost/UI/ReturnToBodyMenu.cs
@@ -15,7 +15,7 @@ public sealed class ReturnToBodyMenu : DefaultWindow
{
Title = Loc.GetString("ghost-return-to-body-title");
- Contents.AddChild(new BoxContainer
+ ContentsContainer.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
diff --git a/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml b/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml
new file mode 100644
index 0000000000..0af8ee3ec0
--- /dev/null
+++ b/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml.cs b/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml.cs
new file mode 100644
index 0000000000..86f7dce9e3
--- /dev/null
+++ b/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml.cs
@@ -0,0 +1,96 @@
+using System.Diagnostics.CodeAnalysis;
+using Content.Client.Guidebook.Richtext;
+using Content.Client.Message;
+using Content.Client.UserInterface.ControlExtensions;
+using JetBrains.Annotations;
+using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Prototypes;
+
+using Content.Shared.Silicons.Laws;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Guidebook.Controls;
+
+///
+/// Control for embedding an AI Lawset in a guidebook
+///
+[UsedImplicitly, GenerateTypedNameReferences]
+public sealed partial class GuideLawsetEmbed : Control, IDocumentTag, ISearchableControl, IPrototypeRepresentationControl
+{
+ [Dependency] private readonly IPrototypeManager _prototype = default!;
+
+ private ISawmill _logging = default!;
+
+ public IPrototype? RepresentedPrototype { get; private set; }
+
+ public GuideLawsetEmbed()
+ {
+ RobustXamlLoader.Load(this);
+ IoCManager.InjectDependencies(this);
+ MouseFilter = MouseFilterMode.Stop;
+ }
+
+ public GuideLawsetEmbed(SiliconLawsetPrototype lawset) : this()
+ {
+ GenerateControl(lawset);
+ }
+
+ private void GenerateControl(SiliconLawsetPrototype lawset)
+ {
+ RepresentedPrototype = lawset;
+
+ var lawsetNameString = lawset.Name == null ? lawset.ID : Loc.GetString(lawset.Name);
+ LawsetName.SetMarkup($"[bold]{FormattedMessage.EscapeText(lawsetNameString)}[/bold]");
+
+ var i = 1;
+ foreach (var lawID in lawset.Laws)
+ {
+ var lawPrototype = _prototype.Index(lawID);
+ var locLawString = Loc.GetString(lawPrototype.LawString);
+
+ RichTextLabel lawN = new()
+ {
+ Margin = new(0, 5, 0, 1)
+ };
+ var locLawStatement = Loc.GetString("laws-number-wrapper", ("lawnumber", i), ("lawstring", locLawString));
+ lawN.SetMarkup(locLawStatement);
+ LawsetContainer.AddChild(lawN);
+
+ i++;
+ }
+ }
+
+ public bool TryParseTag(Dictionary args, [NotNullWhen(true)] out Control? control)
+ {
+ control = null;
+ if (!args.TryGetValue("Lawset", out var id))
+ {
+ _logging.Error("Lawset embed tag is missing lawset prototype argument");
+ return false;
+ }
+
+ if (!_prototype.TryIndex(id, out var lawset))
+ {
+ _logging.Error($"Specified SiliconLawsetPrototype \"{id}\" is not a valid Lawset prototype");
+ return false;
+ }
+
+ GenerateControl(lawset);
+
+ control = this;
+ return true;
+ }
+
+ public bool CheckMatchesSearch(string query)
+ {
+ return this.ChildrenContainText(query);
+ }
+
+ public void SetHiddenState(bool state, string query)
+ {
+ Visible = CheckMatchesSearch(query) ? state : !state;
+ }
+}
diff --git a/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml b/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml
new file mode 100644
index 0000000000..59434cff0b
--- /dev/null
+++ b/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml.cs b/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml.cs
new file mode 100644
index 0000000000..108f066c39
--- /dev/null
+++ b/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml.cs
@@ -0,0 +1,40 @@
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using Content.Client.Guidebook.Richtext;
+using JetBrains.Annotations;
+using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Prototypes;
+
+using Content.Shared.Silicons.Laws;
+
+namespace Content.Client.Guidebook.Controls;
+
+///
+/// Control for iterating and embedding every SiliconLawsetPrototype into the guidebook.
+///
+[UsedImplicitly, GenerateTypedNameReferences]
+public sealed partial class GuideLawsetListEmbed : Control, IDocumentTag
+{
+ [Dependency] private readonly IPrototypeManager _prototype = default!;
+
+ public GuideLawsetListEmbed()
+ {
+ RobustXamlLoader.Load(this);
+ IoCManager.InjectDependencies(this);
+ MouseFilter = MouseFilterMode.Stop;
+ }
+
+ public bool TryParseTag(Dictionary args, [NotNullWhen(true)] out Control? control)
+ {
+ foreach (var lawset in _prototype.EnumeratePrototypes().OrderBy(x => x.ID))
+ {
+ GuideLawsetEmbed embed = new(lawset);
+ GroupContainer.AddChild(embed);
+ }
+
+ control = this;
+ return true;
+ }
+}
diff --git a/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml b/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml
index 78e65db2a3..1f543cf402 100644
--- a/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml
+++ b/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml
@@ -4,11 +4,11 @@
-
-
+
+
-
+
diff --git a/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml.cs b/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml.cs
index 4cde587c58..4d9d6a90ba 100644
--- a/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml.cs
+++ b/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml.cs
@@ -118,7 +118,7 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
});
_enable = new CheckBox
{
- Text = "Enable",
+ Text = Loc.GetString("humanoid-marking-modifier-enable"),
HorizontalAlignment = HAlignment.Right
};
@@ -134,8 +134,8 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
OnStateChanged!();
};
- var lineEditBox = new BoxContainer();
- lineEditBox.AddChild(new Label { Text = "Prototype id: "});
+ var lineEditBox = new BoxContainer { SeparationOverride = 4 };
+ lineEditBox.AddChild(new Label { Text = Loc.GetString("humanoid-marking-modifier-prototype-id") });
// TODO: This line edit should really be an options / dropdown selector, not text.
_lineEdit = new() { MinWidth = 200 };
diff --git a/Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs b/Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs
index c12ddb9319..6f66990b4e 100644
--- a/Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs
+++ b/Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs
@@ -116,7 +116,7 @@ public sealed partial class ChameleonControllerMenu : FancyWindow
var button = new Button
{
HorizontalExpand = true,
- StyleClasses = {StyleBase.ButtonSquare},
+ StyleClasses = {StyleClass.ButtonSquare},
ToolTip = Loc.GetString(name),
Text = Loc.GetString(name),
Margin = new Thickness(0, 0, 15, 0),
diff --git a/Content.Client/Implants/UI/ImplanterStatusControl.cs b/Content.Client/Implants/UI/ImplanterStatusControl.cs
index 24445eeecf..43579ae6be 100644
--- a/Content.Client/Implants/UI/ImplanterStatusControl.cs
+++ b/Content.Client/Implants/UI/ImplanterStatusControl.cs
@@ -19,7 +19,7 @@ public sealed class ImplanterStatusControl : Control
{
IoCManager.InjectDependencies(this);
_parent = parent;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
_label.MaxWidth = 350;
AddChild(new ClipControl { Children = { _label } });
diff --git a/Content.Client/Info/RulesAndInfoWindow.cs b/Content.Client/Info/RulesAndInfoWindow.cs
index b9131dcb3c..4f483cf26c 100644
--- a/Content.Client/Info/RulesAndInfoWindow.cs
+++ b/Content.Client/Info/RulesAndInfoWindow.cs
@@ -36,7 +36,7 @@ namespace Content.Client.Info
PopulateTutorial(tutorialList);
- Contents.AddChild(rootContainer);
+ ContentsContainer.AddChild(rootContainer);
SetSize = new Vector2(650, 650);
}
diff --git a/Content.Client/Info/RulesPopup.xaml b/Content.Client/Info/RulesPopup.xaml
index 80ed415550..c94f061865 100644
--- a/Content.Client/Info/RulesPopup.xaml
+++ b/Content.Client/Info/RulesPopup.xaml
@@ -16,7 +16,7 @@
Text="{Loc 'ui-rules-accept'}"
Disabled="True" />
diff --git a/Content.Client/Inventory/StrippableBoundUserInterface.cs b/Content.Client/Inventory/StrippableBoundUserInterface.cs
index 381406d2ac..6d18bd6bda 100644
--- a/Content.Client/Inventory/StrippableBoundUserInterface.cs
+++ b/Content.Client/Inventory/StrippableBoundUserInterface.cs
@@ -154,7 +154,7 @@ namespace Content.Client.Inventory
var button = new Button()
{
Text = Loc.GetString("strippable-bound-user-interface-stripping-menu-ensnare-button"),
- StyleClasses = { StyleBase.ButtonOpenRight }
+ StyleClasses = { StyleClass.ButtonOpenRight }
};
button.OnPressed += (_) => SendPredictedMessage(new StrippingEnsnareButtonPressed());
diff --git a/Content.Client/Kitchen/UI/MicrowaveMenu.xaml b/Content.Client/Kitchen/UI/MicrowaveMenu.xaml
index cd81ea0a9b..cf0b5634c5 100644
--- a/Content.Client/Kitchen/UI/MicrowaveMenu.xaml
+++ b/Content.Client/Kitchen/UI/MicrowaveMenu.xaml
@@ -2,7 +2,6 @@
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
- xmlns:style="clr-namespace:Content.Client.Stylesheets"
Title="{Loc 'microwave-menu-title'}"
MinWidth="512"
MinSize="512 256">
@@ -78,14 +77,14 @@
Name="StartButton"
Access="Public"
Text="{Loc 'microwave-menu-start-button'}"
- StyleClasses="ButtonColorGreen"
+ StyleClasses="positive"
TextAlign="Center" />
diff --git a/Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs b/Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs
index b9b58f2322..95d5cc7ab3 100644
--- a/Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs
+++ b/Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs
@@ -33,6 +33,7 @@ namespace Content.Client.Labels.UI
_window.OnLabelChanged += OnLabelChanged;
Reload();
+ _window.SetInitialLabelState(); // Must be after Reload() has set the label text
}
private void OnLabelChanged(string newLabel)
diff --git a/Content.Client/Labels/UI/HandLabelerWindow.xaml b/Content.Client/Labels/UI/HandLabelerWindow.xaml
index 0bf03410c1..7bbadb843d 100644
--- a/Content.Client/Labels/UI/HandLabelerWindow.xaml
+++ b/Content.Client/Labels/UI/HandLabelerWindow.xaml
@@ -1,8 +1,14 @@
-
+ Title="{Loc 'hand-labeler-ui-header'}"
+ SetWidth="400"
+ MinWidth="150">
+
+
+
+
+
diff --git a/Content.Client/Labels/UI/HandLabelerWindow.xaml.cs b/Content.Client/Labels/UI/HandLabelerWindow.xaml.cs
index 528e227f55..32c9d980a4 100644
--- a/Content.Client/Labels/UI/HandLabelerWindow.xaml.cs
+++ b/Content.Client/Labels/UI/HandLabelerWindow.xaml.cs
@@ -16,6 +16,7 @@ namespace Content.Client.Labels.UI
// TODO LineEdit Make this a bool on the LineEdit control
private string _label = string.Empty;
+ private string _initialLabel = string.Empty;
public HandLabelerWindow()
{
@@ -25,6 +26,7 @@ namespace Content.Client.Labels.UI
{
_label = e.Text;
OnLabelChanged?.Invoke(_label);
+ UpdateButtons();
};
LabelLineEdit.OnFocusEnter += _ => _focused = true;
@@ -33,12 +35,14 @@ namespace Content.Client.Labels.UI
_focused = false;
LabelLineEdit.Text = _label;
};
+ ResetLabelButton.OnPressed += _ => LabelLineEdit.SetText(_initialLabel, true);
+ ClearLabelButton.OnPressed += _ => LabelLineEdit.SetText("", true);
}
protected override void Opened()
{
base.Opened();
-
+
// Give the editor keyboard focus, since that's the only
// thing the user will want to be doing with this UI
LabelLineEdit.GrabKeyboardFocus();
@@ -51,7 +55,25 @@ namespace Content.Client.Labels.UI
_label = label;
if (!_focused)
+ {
LabelLineEdit.Text = label;
+ UpdateButtons();
+ }
+ }
+
+ public void SetInitialLabelState()
+ {
+ LabelLineEdit.Text = _label;
+ LabelLineEdit.CursorPosition = _label.Length;
+ LabelLineEdit.SelectionStart = 0;
+ _initialLabel = _label;
+ UpdateButtons();
+ }
+
+ public void UpdateButtons()
+ {
+ ResetLabelButton.Disabled = (LabelLineEdit.Text == _initialLabel);
+ ClearLabelButton.Disabled = (LabelLineEdit.Text == "");
}
public void SetMaxLabelLength(int maxLength)
diff --git a/Content.Client/LateJoin/LateJoinGui.cs b/Content.Client/LateJoin/LateJoinGui.cs
index 31c30eb8cb..5d39407ccf 100644
--- a/Content.Client/LateJoin/LateJoinGui.cs
+++ b/Content.Client/LateJoin/LateJoinGui.cs
@@ -61,7 +61,7 @@ namespace Content.Client.LateJoin
VerticalExpand = true,
};
- Contents.AddChild(_base);
+ ContentsContainer.AddChild(_base);
_jobRequirements.Updated += RebuildUI;
RebuildUI();
diff --git a/Content.Client/Launcher/LauncherConnectingGui.xaml b/Content.Client/Launcher/LauncherConnectingGui.xaml
index 34b32f84fe..a8e5a63704 100644
--- a/Content.Client/Launcher/LauncherConnectingGui.xaml
+++ b/Content.Client/Launcher/LauncherConnectingGui.xaml
@@ -5,7 +5,7 @@
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
-
+
-
+
diff --git a/Content.Client/Launcher/LauncherConnectingGui.xaml.cs b/Content.Client/Launcher/LauncherConnectingGui.xaml.cs
index cf89f98095..fe48642ed3 100644
--- a/Content.Client/Launcher/LauncherConnectingGui.xaml.cs
+++ b/Content.Client/Launcher/LauncherConnectingGui.xaml.cs
@@ -43,7 +43,7 @@ namespace Content.Client.Launcher
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
- Stylesheet = IoCManager.Resolve().SheetSpace;
+ Stylesheet = IoCManager.Resolve().SheetSystem;
ChangeLoginTip();
RetryButton.OnPressed += ReconnectButtonPressed;
diff --git a/Content.Client/Lobby/UI/CharacterPickerButton.xaml b/Content.Client/Lobby/UI/CharacterPickerButton.xaml
index ecd706f5a7..723da433a1 100644
--- a/Content.Client/Lobby/UI/CharacterPickerButton.xaml
+++ b/Content.Client/Lobby/UI/CharacterPickerButton.xaml
@@ -18,7 +18,7 @@
+ StyleClasses="negative"/>
diff --git a/Content.Client/Lobby/UI/CharacterSetupGui.xaml b/Content.Client/Lobby/UI/CharacterSetupGui.xaml
index 94dd363b5b..9d1ccb20f0 100644
--- a/Content.Client/Lobby/UI/CharacterSetupGui.xaml
+++ b/Content.Client/Lobby/UI/CharacterSetupGui.xaml
@@ -34,19 +34,13 @@
Text="{Loc 'character-setup-gui-character-setup-close-button'}"
StyleClasses="ButtonBig"/>
-
-
-
-
+
-
-
-
-
+
diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
index d4218578ca..cae660cf9a 100644
--- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
+++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
@@ -6,8 +6,8 @@ using Content.Client.Lobby.UI.Loadouts;
using Content.Client.Lobby.UI.Roles;
using Content.Client.Message;
using Content.Client.Players.PlayTimeTracking;
-using Content.Client.Sprite;
using Content.Client.Stylesheets;
+using Content.Client.Sprite;
using Content.Client.UserInterface.Systems.Guidebook;
using Content.Shared.CCVar;
using Content.Shared.Clothing;
@@ -598,7 +598,7 @@ namespace Content.Client.Lobby.UI
{
Text = Loc.GetString(category.Name),
Margin = new Thickness(0, 10, 0, 0),
- StyleClasses = { StyleBase.StyleClassLabelHeading },
+ StyleClasses = { StyleClass.LabelHeading },
});
}
@@ -666,6 +666,7 @@ namespace Content.Client.Lobby.UI
_species.Clear();
_species.AddRange(_prototypeManager.EnumeratePrototypes().Where(o => o.RoundStart));
+ _species.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.CurrentCultureIgnoreCase));
var speciesIds = _species.Select(o => o.ID).ToList();
for (var i = 0; i < _species.Count; i++)
@@ -1420,7 +1421,7 @@ namespace Content.Client.Lobby.UI
return;
const string style = "SpeciesInfoDefault";
- SpeciesInfoButton.StyleClasses.Add(style);
+ SpeciesInfoButton.StyleIdentifier = style;
}
private void UpdateMarkings()
diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs b/Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs
new file mode 100644
index 0000000000..016541dc23
--- /dev/null
+++ b/Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs
@@ -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
+{
+ public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+ {
+ return
+ [
+ E()
+ .Identifier("SpeciesInfoDefault")
+ .Prop(TextureButton.StylePropertyTexture,
+ ResCache.GetTexture("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
+ // copied from `StyleNano`, but this is unused
+ // E()
+ // .Identifier("SpeciesInfoWarning")
+ // .Prop(TextureButton.StylePropertyTexture,
+ // ResCache.GetTexture("/Textures/Interface/info.svg.192dpi.png"))
+ // .Prop(Control.StylePropertyModulateSelf, sheet.HighlightPalette[0]),
+ ];
+ }
+}
diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml
index 0deb1c82ba..f89b38ca8a 100644
--- a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml
+++ b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml
@@ -1,7 +1,7 @@
-
+
diff --git a/Content.Client/Lobby/UI/LobbyGui.xaml b/Content.Client/Lobby/UI/LobbyGui.xaml
index 64291816ab..9b5c761644 100644
--- a/Content.Client/Lobby/UI/LobbyGui.xaml
+++ b/Content.Client/Lobby/UI/LobbyGui.xaml
@@ -20,7 +20,7 @@
-
-
+
@@ -63,7 +63,7 @@
-
@@ -73,7 +73,7 @@
HorizontalExpand="True" HorizontalAlignment="Center" />
-
+
@@ -97,7 +97,7 @@
-
+
@@ -111,7 +111,7 @@
-
+
diff --git a/Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs b/Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs
index ce75537355..3e6f4cfb2f 100644
--- a/Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs
+++ b/Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs
@@ -31,9 +31,9 @@ public sealed partial class RequirementsSelector : BoxContainer
RobustXamlLoader.Load(this);
_options = new RadioOptions(RadioOptionsLayout.Horizontal)
{
- FirstButtonStyle = StyleBase.ButtonOpenRight,
- ButtonStyle = StyleBase.ButtonOpenBoth,
- LastButtonStyle = StyleBase.ButtonOpenLeft,
+ FirstButtonStyle = StyleClass.ButtonOpenRight,
+ ButtonStyle = StyleClass.ButtonOpenBoth,
+ LastButtonStyle = StyleClass.ButtonOpenLeft,
HorizontalExpand = true,
};
//Override default radio option button width
@@ -50,7 +50,7 @@ public sealed partial class RequirementsSelector : BoxContainer
Text = Loc.GetString("role-timer-locked"),
Visible = true,
HorizontalAlignment = HAlignment.Center,
- StyleClasses = {StyleBase.StyleClassLabelSubText},
+ StyleClasses = {StyleClass.LabelSubText},
};
_lockStripe = new StripeBack()
diff --git a/Content.Client/MainMenu/UI/MainMenuControl.xaml.cs b/Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
index 1d5244305d..45bd94f7b6 100644
--- a/Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
+++ b/Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
@@ -11,6 +11,9 @@ namespace Content.Client.MainMenu.UI;
[GenerateTypedNameReferences]
public sealed partial class MainMenuControl : Control
{
+ public const string StyleIdentifierMainMenu = "mainMenu";
+ public const string StyleIdentifierMainMenuVBox = "mainMenuVBox";
+
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
{
RobustXamlLoader.Load(this);
diff --git a/Content.Client/MainMenu/UI/MainMenuSheetlet.cs b/Content.Client/MainMenu/UI/MainMenuSheetlet.cs
new file mode 100644
index 0000000000..45171af3b7
--- /dev/null
+++ b/Content.Client/MainMenu/UI/MainMenuSheetlet.cs
@@ -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
+{
+ public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
+ {
+ return
+ [
+ // make those buttons bigger
+ E
diff --git a/Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml.cs b/Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml.cs
index a316b9e34a..d7c010e2e3 100644
--- a/Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml.cs
+++ b/Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml.cs
@@ -47,7 +47,7 @@ public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
FooterPanel.PanelOverride = footerStyleBox;
MainPanel.PanelOverride = new StyleBoxFlat(Color.FromHex(PanelBgColor));
- ButtonClear.AddStyleClass("ButtonColorRed");
+ ButtonClear.AddStyleClass("negative");
ButtonLinkDefault.Disabled = true;
_links = new LinksRender(ButtonContainerLeft, ButtonContainerRight);
diff --git a/Content.Client/NetworkConfigurator/Systems/NetworkConfiguratorSystem.cs b/Content.Client/NetworkConfigurator/Systems/NetworkConfiguratorSystem.cs
index 9828222447..0a55cf0db8 100644
--- a/Content.Client/NetworkConfigurator/Systems/NetworkConfiguratorSystem.cs
+++ b/Content.Client/NetworkConfigurator/Systems/NetworkConfiguratorSystem.cs
@@ -112,7 +112,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
{
_configurator = configurator;
_keyBindingName = keyBindingName;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
}
diff --git a/Content.Client/Nuke/NukeMenu.xaml b/Content.Client/Nuke/NukeMenu.xaml
index bb7067565f..c6742a0997 100644
--- a/Content.Client/Nuke/NukeMenu.xaml
+++ b/Content.Client/Nuke/NukeMenu.xaml
@@ -39,7 +39,7 @@
+ StyleClasses="negative"/>
diff --git a/Content.Client/NukeOps/WarDeclaratorWindow.xaml b/Content.Client/NukeOps/WarDeclaratorWindow.xaml
index 43381158a2..ad813bd7df 100644
--- a/Content.Client/NukeOps/WarDeclaratorWindow.xaml
+++ b/Content.Client/NukeOps/WarDeclaratorWindow.xaml
@@ -9,7 +9,7 @@
Access="Public" />
+ StyleClasses="negative" />
diff --git a/Content.Client/Options/UI/OptionsTabControlRow.xaml.cs b/Content.Client/Options/UI/OptionsTabControlRow.xaml.cs
index ad262f94a2..32680dfcc2 100644
--- a/Content.Client/Options/UI/OptionsTabControlRow.xaml.cs
+++ b/Content.Client/Options/UI/OptionsTabControlRow.xaml.cs
@@ -58,7 +58,7 @@ public sealed partial class OptionsTabControlRow : Control
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
- ResetButton.StyleClasses.Add(StyleBase.ButtonOpenRight);
+ ResetButton.StyleClasses.Add(StyleClass.ButtonOpenRight);
ApplyButton.OnPressed += ApplyButtonPressed;
ResetButton.OnPressed += ResetButtonPressed;
DefaultButton.OnPressed += DefaultButtonPressed;
diff --git a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
index 59c9607b24..f92f66df31 100644
--- a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
+++ b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
@@ -130,8 +130,7 @@ namespace Content.Client.Options.UI.Tabs
KeybindsContainer.AddChild(new Label
{
Text = Loc.GetString(headerContents),
- FontColorOverride = StyleNano.NanoGold,
- StyleClasses = { StyleNano.StyleClassLabelKeyText }
+ StyleClasses = { StyleClass.LabelKeyText }
});
}
@@ -528,9 +527,9 @@ namespace Content.Client.Options.UI.Tabs
HorizontalAlignment = HAlignment.Left
};
- BindButton1 = new BindButton(parent, this, StyleBase.ButtonOpenRight);
- BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft);
- ResetButton = new Button { Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleBase.ButtonCaution } };
+ BindButton1 = new BindButton(parent, this, StyleClass.ButtonOpenRight);
+ BindButton2 = new BindButton(parent, this, StyleClass.ButtonOpenLeft);
+ ResetButton = new Button { Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleClass.Negative } };
var hBox = new BoxContainer
{
diff --git a/Content.Client/PAI/PAISystem.cs b/Content.Client/PAI/PAISystem.cs
deleted file mode 100644
index a28cf6a077..0000000000
--- a/Content.Client/PAI/PAISystem.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-using Content.Shared.PAI;
-
-namespace Content.Client.PAI
-{
- public sealed class PAISystem : SharedPAISystem
- {
- }
-}
diff --git a/Content.Client/PDA/PdaSheetlet.cs b/Content.Client/PDA/PdaSheetlet.cs
new file mode 100644
index 0000000000..4791ae53c3
--- /dev/null
+++ b/Content.Client/PDA/PdaSheetlet.cs
@@ -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
+{
+ 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()
+ .Class("PdaContentBackground")
+ .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.SquareStyleBox(sheet))
+ .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#25252a")),
+
+ E()
+ .Class("PdaBackground")
+ .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.SquareStyleBox(sheet))
+ .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#000000")),
+
+ E()
+ .Class("PdaBackgroundRect")
+ .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.BaseStyleBox((sheet)))
+ .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#717059")),
+
+ E()
+ .Class("PdaBorderRect")
+ .Prop(PanelContainer.StylePropertyPanel, angleBorderRect),
+
+ //PDA - Buttons
+ E()
+ .Pseudo(ContainerButton.StylePseudoClassNormal)
+ .Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
+ .Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
+
+ E()
+ .Pseudo(ContainerButton.StylePseudoClassHover)
+ .Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.HoverColor))
+ .Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
+
+ E()
+ .Pseudo(ContainerButton.StylePseudoClassPressed)
+ .Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.PressedColor))
+ .Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
+
+ E()
+ .Pseudo(ContainerButton.StylePseudoClassDisabled)
+ .Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
+ .Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.DisabledFgColor)),
+
+ E()
+ .Pseudo(ContainerButton.StylePseudoClassNormal)
+ .Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.NormalBgColor)),
+
+ E()
+ .Pseudo(ContainerButton.StylePseudoClassHover)
+ .Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
+
+ E()
+ .Pseudo(ContainerButton.StylePseudoClassPressed)
+ .Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
+
+ //PDA - Text
+ E