Merge branch 'master' into offmed-staging

This commit is contained in:
Janet Blackquill
2025-11-05 16:52:49 -05:00
1731 changed files with 38109 additions and 46754 deletions

View File

@@ -22,6 +22,8 @@ namespace Content.Client.UserInterface.Systems.Actions.Controls;
public sealed class ActionButton : Control, IEntityControl
{
public const string StyleClassActionHighlightRect = "ActionHighlightRect";
private IEntityManager _entities;
private IPlayerManager _player;
private SpriteSystem? _spriteSys;
@@ -79,7 +81,7 @@ public sealed class ActionButton : Control, IEntityControl
};
HighlightRect = new PanelContainer
{
StyleClasses = {StyleNano.StyleClassHandSlotHighlight},
StyleClasses = { StyleClassActionHighlightRect },
MinSize = new Vector2(32, 32),
Visible = false
};

View File

@@ -1,10 +0,0 @@
<controls:ActionTooltip
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Systems.Actions.Controls"
StyleClasses="StyleClassTooltipPanel">
<BoxContainer Orientation="Vertical" RectClipContent="True">
<RichTextLabel MaxWidth="350" StyleClasses="StyleClassTooltipActionTitle"/>
<RichTextLabel MaxWidth="350" StyleClasses="StyleClassTooltipActionDescription"/>
<RichTextLabel MaxWidth="350" StyleClasses="StyleClassTooltipActionCharges"/>
</BoxContainer>
</controls:ActionTooltip>

View File

@@ -1,14 +0,0 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.UserInterface.Systems.Actions.Controls;
[GenerateTypedNameReferences]
public sealed partial class ActionTooltip : PanelContainer
{
public ActionTooltip()
{
RobustXamlLoader.Load(this);
}
}

View File

@@ -8,6 +8,8 @@ namespace Content.Client.UserInterface.Systems.Actions.Windows;
[GenerateTypedNameReferences]
public sealed partial class ActionsWindow : DefaultWindow
{
public const string StyleClassActionSearchBox = "actionSearchBox";
public MultiselectOptionButton<Filters> FilterButton { get; private set; }
/// <summary>

View File

@@ -14,18 +14,12 @@ namespace Content.Client.UserInterface.Systems.Alerts.Widgets;
[GenerateTypedNameReferences]
public sealed partial class AlertsUI : UIWidget
{
[Dependency] private readonly ILogManager _logManager = default!;
private readonly ISawmill _sawmill = default!;
// also known as Control.Children?
private readonly Dictionary<AlertKey, AlertControl> _alertControls = new();
public AlertsUI()
{
RobustXamlLoader.Load(this);
_sawmill = _logManager.GetSawmill("alertsui");
}
public void SyncControls(AlertsSystem alertsSystem,
@@ -84,15 +78,15 @@ public sealed partial class AlertsUI : UIWidget
{
if (!alertKey.AlertType.HasValue)
{
_sawmill.Warning("found alertkey without alerttype," +
" alert keys should never be stored without an alerttype set: {0}", alertKey);
Logger.WarningS("alert", "found alertkey without alerttype," +
" alert keys should never be stored without an alerttype set: {0}", alertKey);
continue;
}
var alertType = alertKey.AlertType.Value;
if (!alertsSystem.TryGet(alertType, out var newAlert))
{
_sawmill.Error("Unrecognized alertType {0}", alertType);
Logger.ErrorS("alert", "Unrecognized alertType {0}", alertType);
continue;
}

View File

@@ -95,7 +95,7 @@ public sealed class GasTankWindow
_topLabel = new Label
{
FontOverride = font,
FontColorOverride = StyleNano.NanoGold,
StyleClasses = { StyleClass.LabelKeyText },
VerticalAlignment = VAlignment.Center,
HorizontalExpand = true,
HorizontalAlignment = HAlignment.Left,

View File

@@ -250,15 +250,15 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
private void UnreadAHelpReceived()
{
GameAHelpButton?.StyleClasses.Add(MenuButton.StyleClassRedTopButton);
LobbyAHelpButton?.StyleClasses.Add(StyleNano.StyleClassButtonColorRed);
GameAHelpButton?.StyleClasses.Add(StyleClass.Negative);
LobbyAHelpButton?.StyleClasses.Add(StyleClass.Negative);
_hasUnreadAHelp = true;
}
private void UnreadAHelpRead()
{
GameAHelpButton?.StyleClasses.Remove(MenuButton.StyleClassRedTopButton);
LobbyAHelpButton?.StyleClasses.Remove(StyleNano.StyleClassButtonColorRed);
GameAHelpButton?.StyleClasses.Remove(StyleClass.Negative);
LobbyAHelpButton?.StyleClasses.Remove(StyleClass.Negative);
_hasUnreadAHelp = false;
}

View File

@@ -155,7 +155,7 @@ public sealed class CharacterUIController : UIController, IOnStateEntered<Gamepl
var objectiveLabel = new RichTextLabel
{
StyleClasses = { StyleNano.StyleClassTooltipActionTitle }
StyleClasses = { StyleClass.TooltipTitle }
};
objectiveLabel.SetMessage(objectiveText);

View File

@@ -278,7 +278,7 @@ public sealed partial class ChatUIController : UIController
&& style is StyleBoxFlat propStyleBoxFlat)
color = propStyleBoxFlat.BackgroundColor;
else
color = StyleNano.ChatBackgroundColor;
color = Color.FromHex("#25252ADD");
panel.PanelOverride = new StyleBoxFlat
{
@@ -689,7 +689,7 @@ public sealed partial class ChatUIController : UIController
radioChannel = null;
return _player.LocalEntity is EntityUid { Valid: true } uid
&& _chatSys != null
&& _chatSys.TryProccessRadioMessage(uid, text, out _, out radioChannel, quiet: true);
&& _chatSys.TryProcessRadioMessage(uid, text, out _, out radioChannel, quiet: true);
}
public void UpdateSelectedChannel(ChatBox box)

View File

@@ -6,6 +6,9 @@ namespace Content.Client.UserInterface.Systems.Chat.Controls;
public sealed class ChannelSelectorItemButton : Button
{
public const string StyleClassChatSelectorOptionButton = "ChatSelectorOptionButton";
public readonly ChatSelectChannel Channel;
public bool IsHidden => Parent == null;
@@ -13,7 +16,7 @@ public sealed class ChannelSelectorItemButton : Button
public ChannelSelectorItemButton(ChatSelectChannel selector)
{
Channel = selector;
AddStyleClass(StyleNano.StyleClassChatChannelSelectorButton);
AddStyleClass(StyleClassChatSelectorOptionButton);
Text = ChannelSelectorButton.ChannelSelectorName(selector);

View File

@@ -1,5 +1,4 @@
using Content.Client.Stylesheets;
using Content.Shared.Chat;
using Content.Shared.Chat;
using Content.Shared.Input;
using Robust.Client.UserInterface.Controls;
@@ -8,6 +7,10 @@ namespace Content.Client.UserInterface.Systems.Chat.Controls;
[Virtual]
public class ChatInputBox : PanelContainer
{
public const string StyleClassChatPanel = "ChatPanel";
public const string StyleClassChatLineEdit = "ChatLineEdit";
public const string StyleClassChatFilterOptionButton = "ChatFilterOptionButton";
public readonly ChannelSelectorButton ChannelSelector;
public readonly HistoryLineEdit Input;
public readonly ChannelFilterButton FilterButton;
@@ -27,7 +30,7 @@ public class ChatInputBox : PanelContainer
{
Name = "ChannelSelector",
ToggleMode = true,
StyleClasses = {"chatSelectorOptionButton"},
StyleClasses = { ChannelSelectorItemButton.StyleClassChatSelectorOptionButton },
MinWidth = 75
};
Container.AddChild(ChannelSelector);
@@ -36,16 +39,16 @@ public class ChatInputBox : PanelContainer
Name = "Input",
PlaceHolder = GetChatboxInfoPlaceholder(),
HorizontalExpand = true,
StyleClasses = {"chatLineEdit"}
StyleClasses = { StyleClassChatLineEdit }
};
Container.AddChild(Input);
FilterButton = new ChannelFilterButton
{
Name = "FilterButton",
StyleClasses = {"chatFilterOptionButton"}
StyleClasses = { StyleClassChatFilterOptionButton }
};
Container.AddChild(FilterButton);
AddStyleClass(StyleNano.StyleClassChatSubPanel);
AddStyleClass(StyleClassChatPanel);
ChannelSelector.OnChannelSelect += UpdateActiveChannel;
}
@@ -56,12 +59,17 @@ public class ChatInputBox : PanelContainer
private static string GetChatboxInfoPlaceholder()
{
return (BoundKeyHelper.IsBound(ContentKeyFunctions.FocusChat), BoundKeyHelper.IsBound(ContentKeyFunctions.CycleChatChannelForward)) switch
{
(true, true) => Loc.GetString("hud-chatbox-info", ("talk-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.FocusChat)), ("cycle-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.CycleChatChannelForward))),
(true, false) => Loc.GetString("hud-chatbox-info-talk", ("talk-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.FocusChat))),
(false, true) => Loc.GetString("hud-chatbox-info-cycle", ("cycle-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.CycleChatChannelForward))),
(false, false) => Loc.GetString("hud-chatbox-info-unbound")
};
return (BoundKeyHelper.IsBound(ContentKeyFunctions.FocusChat),
BoundKeyHelper.IsBound(ContentKeyFunctions.CycleChatChannelForward)) switch
{
(true, true) => Loc.GetString("hud-chatbox-info",
("talk-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.FocusChat)),
("cycle-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.CycleChatChannelForward))),
(true, false) => Loc.GetString("hud-chatbox-info-talk",
("talk-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.FocusChat))),
(false, true) => Loc.GetString("hud-chatbox-info-cycle",
("cycle-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.CycleChatChannelForward))),
(false, false) => Loc.GetString("hud-chatbox-info-unbound")
};
}
}

View File

@@ -1,4 +1,4 @@
using Content.Shared.Damage;
using Content.Shared.Damage.Components;
using Content.Shared.FixedPoint;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;

View File

@@ -27,7 +27,7 @@ public sealed partial class GhostGui : UIWidget
GhostWarpButton.OnPressed += _ => RequestWarpsPressed?.Invoke();
ReturnToBodyButton.OnPressed += _ => ReturnToBodyPressed?.Invoke();
GhostRolesButton.OnPressed += _ => GhostRolesPressed?.Invoke();
GhostRolesButton.OnPressed += _ => GhostRolesButton.StyleClasses.Remove(StyleBase.ButtonCaution);
GhostRolesButton.OnPressed += _ => GhostRolesButton.StyleClasses.Remove(StyleClass.Negative);
}
public void Hide()
@@ -46,7 +46,7 @@ public sealed partial class GhostGui : UIWidget
if (roles > _prevNumberRoles)
{
GhostRolesButton.StyleClasses.Add(StyleBase.ButtonCaution);
GhostRolesButton.StyleClasses.Add(StyleClass.Negative);
}
_prevNumberRoles = (int)roles;

View File

@@ -21,7 +21,7 @@
ToolTip="{Loc 'game-hud-open-escape-menu-button-tooltip'}"
MinSize="70 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonOpenRight}"
AppendStyleClass="{x:Static style:StyleClass.ButtonOpenRight}"
/>
<ui:MenuButton
Name="GuidebookButton"
@@ -31,7 +31,7 @@
BoundKey = "{x:Static is:ContentKeyFunctions.OpenGuidebook}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
/>
<ui:MenuButton
Name="CharacterButton"
@@ -41,7 +41,7 @@
BoundKey = "{x:Static is:ContentKeyFunctions.OpenCharacterMenu}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
/>
<ui:MenuButton
Name="EmotesButton"
@@ -51,7 +51,7 @@
BoundKey = "{x:Static is:ContentKeyFunctions.OpenEmotesMenu}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
/>
<ui:MenuButton
Name="CraftingButton"
@@ -61,7 +61,7 @@
ToolTip="{Loc 'game-hud-open-crafting-menu-button-tooltip'}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
/>
<ui:MenuButton
Name="ActionButton"
@@ -71,7 +71,7 @@
ToolTip="{Loc 'game-hud-open-actions-menu-button-tooltip'}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
/>
<ui:MenuButton
Name="AdminButton"
@@ -81,7 +81,7 @@
ToolTip="{Loc 'game-hud-open-admin-menu-button-tooltip'}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
/>
<ui:MenuButton
Name="SandboxButton"
@@ -91,7 +91,7 @@
ToolTip="{Loc 'game-hud-open-sandbox-menu-button-tooltip'}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
/>
<ui:MenuButton
Name="AHelpButton"
@@ -101,6 +101,6 @@
ToolTip="{Loc 'ui-options-function-open-a-help'}"
MinSize="42 64"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonOpenLeft}"
AppendStyleClass="{x:Static style:StyleClass.ButtonOpenLeft}"
/>
</widgets:GameTopMenuBar>

View File

@@ -1,4 +1,5 @@
using Content.Client.SubFloor;
using Content.Client.Stylesheets;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;