merge remote master, upstream

This commit is contained in:
Dmitry
2025-10-26 22:31:58 +07:00
1466 changed files with 31780 additions and 19994 deletions

View File

@@ -13,7 +13,7 @@ from typing import List
SOLUTION_PATH = Path("..") / "SpaceStation14.sln" SOLUTION_PATH = Path("..") / "SpaceStation14.sln"
# If this doesn't match the saved version we overwrite them all. # 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" QUIET = len(sys.argv) == 2 and sys.argv[1] == "--quiet"

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
gitroot=$(git rev-parse --show-toplevel) gitroot=$(git rev-parse --show-toplevel)

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Just call post-checkout since it does the same thing. # Just call post-checkout since it does the same thing.
gitroot=$(git rev-parse --git-path hooks) gitroot=$(git rev-parse --git-path hooks)

View File

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

View File

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

View File

@@ -1,6 +1,7 @@
<DefaultWindow xmlns="https://spacestation14.io" <DefaultWindow xmlns="https://spacestation14.io"
MinSize="650 290"> MinSize="650 290">
<BoxContainer Orientation="Vertical"> <BoxContainer Orientation="Vertical">
<!-- Privileged and target IDs, crew manifest button. -->
<GridContainer Columns="2"> <GridContainer Columns="2">
<GridContainer Columns="3" HorizontalExpand="True"> <GridContainer Columns="3" HorizontalExpand="True">
<Label Text="{Loc 'id-card-console-window-privileged-id'}" /> <Label Text="{Loc 'id-card-console-window-privileged-id'}" />
@@ -16,6 +17,7 @@
</BoxContainer> </BoxContainer>
</GridContainer> </GridContainer>
<Control MinSize="0 8" /> <Control MinSize="0 8" />
<!-- Full name and job title editing. -->
<GridContainer Columns="3" HSeparationOverride="4"> <GridContainer Columns="3" HSeparationOverride="4">
<Label Name="FullNameLabel" Text="{Loc 'id-card-console-window-full-name-label'}" /> <Label Name="FullNameLabel" Text="{Loc 'id-card-console-window-full-name-label'}" />
<LineEdit Name="FullNameLineEdit" HorizontalExpand="True" /> <LineEdit Name="FullNameLineEdit" HorizontalExpand="True" />
@@ -26,10 +28,19 @@
<Button Name="JobTitleSaveButton" Text="{Loc 'id-card-console-window-save-button'}" Disabled="True" /> <Button Name="JobTitleSaveButton" Text="{Loc 'id-card-console-window-save-button'}" Disabled="True" />
</GridContainer> </GridContainer>
<Control MinSize="0 8" /> <Control MinSize="0 8" />
<GridContainer Columns="2"> <!-- Job preset selection, grant/revoke all access buttons. -->
<Label Text="{Loc 'id-card-console-window-job-selection-label'}" /> <BoxContainer Margin="0 8 0 4">
<OptionButton Name="JobPresetOptionButton" /> <BoxContainer>
</GridContainer> <Label Text="{Loc 'id-card-console-window-job-selection-label'}" />
<OptionButton Name="JobPresetOptionButton" />
</BoxContainer>
<Control HorizontalExpand="True"/>
<BoxContainer>
<Button Name="SelectAllButton" Text="{Loc 'id-card-console-window-select-all-button'}" />
<Button Name="DeselectAllButton" Text="{Loc 'id-card-console-window-deselect-all-button'}" />
</BoxContainer>
</BoxContainer>
<!-- Individual access buttons -->
<Control Name="AccessLevelControlContainer" /> <Control Name="AccessLevelControlContainer" />
</BoxContainer> </BoxContainer>
</DefaultWindow> </DefaultWindow>

View File

@@ -79,6 +79,18 @@ namespace Content.Client.Access.UI
JobPresetOptionButton.AddItem(Loc.GetString(job.Name), _jobPrototypeIds.Count - 1); JobPresetOptionButton.AddItem(Loc.GetString(job.Name), _jobPrototypeIds.Count - 1);
} }
SelectAllButton.OnPressed += _ =>
{
SetAllAccess(true);
SubmitData();
};
DeselectAllButton.OnPressed += _ =>
{
SetAllAccess(false);
SubmitData();
};
JobPresetOptionButton.OnItemSelected += SelectJobPreset; JobPresetOptionButton.OnItemSelected += SelectJobPreset;
_accessButtons.Populate(accessLevels, prototypeManager); _accessButtons.Populate(accessLevels, prototypeManager);
AccessLevelControlContainer.AddChild(_accessButtons); AccessLevelControlContainer.AddChild(_accessButtons);
@@ -89,14 +101,13 @@ namespace Content.Client.Access.UI
} }
} }
private void ClearAllAccess() /// <param name="enabled">If true, every individual access button will be pressed. If false, each will be depressed.</param>
private void SetAllAccess(bool enabled)
{ {
foreach (var button in _accessButtons.ButtonsList.Values) foreach (var button in _accessButtons.ButtonsList.Values)
{ {
if (button.Pressed) if (!button.Disabled && button.Pressed != enabled)
{ button.Pressed = enabled;
button.Pressed = false;
}
} }
} }
@@ -110,7 +121,7 @@ namespace Content.Client.Access.UI
JobTitleLineEdit.Text = Loc.GetString(job.Name); JobTitleLineEdit.Text = Loc.GetString(job.Name);
args.Button.SelectId(args.Id); args.Button.SelectId(args.Id);
ClearAllAccess(); SetAllAccess(false);
// this is a sussy way to do this // this is a sussy way to do this
foreach (var access in job.Access) foreach (var access in job.Access)

View File

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

View File

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

View File

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

View File

@@ -226,7 +226,7 @@ public sealed partial class BanPanel : DefaultWindow
var roleGroupCheckbox = new Button var roleGroupCheckbox = new Button
{ {
Name = $"{groupName}GroupCheckbox", Name = $"{groupName}GroupCheckbox",
Text = "Ban all", Text = Loc.GetString("role-bans-ban-group"),
Margin = new Thickness(0, 0, 5, 0), Margin = new Thickness(0, 0, 5, 0),
ToggleMode = true, ToggleMode = true,
}; };
@@ -391,7 +391,7 @@ public sealed partial class BanPanel : DefaultWindow
TimeLine.Text = args.Text; TimeLine.Text = args.Text;
if (!double.TryParse(args.Text, out var result)) if (!double.TryParse(args.Text, out var result))
{ {
ExpiresLabel.Text = "err"; ExpiresLabel.Text = Loc.GetString("ban-panel-expiry-error");
ErrorLevel |= ErrorLevelEnum.Minutes; ErrorLevel |= ErrorLevelEnum.Minutes;
TimeLine.ModulateSelfOverride = Color.Red; TimeLine.ModulateSelfOverride = Color.Red;
UpdateSubmitEnabled(); UpdateSubmitEnabled();

View File

@@ -18,7 +18,7 @@
<Button Visible="True" Name="PopOut" Access="Public" Text="{Loc 'admin-logs-pop-out'}" StyleClasses="OpenBoth" HorizontalAlignment="Left" /> <Button Visible="True" Name="PopOut" Access="Public" Text="{Loc 'admin-logs-pop-out'}" StyleClasses="OpenBoth" HorizontalAlignment="Left" />
<Control HorizontalExpand="True" /> <Control HorizontalExpand="True" />
<Button Visible="False" Name="Bans" Text="{Loc 'admin-player-actions-bans'}" StyleClasses="OpenRight" /> <Button Visible="False" Name="Bans" Text="{Loc 'admin-player-actions-bans'}" StyleClasses="OpenRight" />
<Button Visible="False" Name="Notes" Text="{Loc 'admin-player-actions-notes'}" StyleClasses="OpenBoth" /> <Button Visible="False" Access="Public" Name="Notes" Text="{Loc 'admin-player-actions-notes'}" StyleClasses="OpenBoth" />
<controls:ConfirmButton Visible="False" Name="Kick" Text="{Loc 'admin-player-actions-kick'}" ConfirmationText="{Loc 'admin-player-actions-confirm'}" StyleClasses="OpenBoth" /> <controls:ConfirmButton Visible="False" Name="Kick" Text="{Loc 'admin-player-actions-kick'}" ConfirmationText="{Loc 'admin-player-actions-confirm'}" StyleClasses="OpenBoth" />
<Button Visible="False" Name="Ban" Text="{Loc 'admin-player-actions-ban'}" StyleClasses="OpenBoth" /> <Button Visible="False" Name="Ban" Text="{Loc 'admin-player-actions-ban'}" StyleClasses="OpenBoth" />
<controls:ConfirmButton Visible="False" Name="Respawn" Text="{Loc 'admin-player-actions-respawn'}" ConfirmationText="{Loc 'admin-player-actions-confirm'}" StyleClasses="OpenBoth" /> <controls:ConfirmButton Visible="False" Name="Respawn" Text="{Loc 'admin-player-actions-respawn'}" ConfirmationText="{Loc 'admin-player-actions-confirm'}" StyleClasses="OpenBoth" />

View File

@@ -166,7 +166,7 @@ public sealed class AdminLogsEui : BaseEui
ClydeWindow = _clyde.CreateWindow(new WindowCreateParameters ClydeWindow = _clyde.CreateWindow(new WindowCreateParameters
{ {
Maximized = false, Maximized = false,
Title = "Admin Logs", Title = Loc.GetString("admin-logs-title"),
Monitor = monitor, Monitor = monitor,
Width = 1100, Width = 1100,
Height = 400 Height = 400

View File

@@ -5,7 +5,7 @@
<BoxContainer Orientation="Vertical" Name="Notes" Access="Public" VerticalExpand="True"/> <BoxContainer Orientation="Vertical" Name="Notes" Access="Public" VerticalExpand="True"/>
</ScrollContainer> </ScrollContainer>
<Button Name="ShowMoreButton" Text="{Loc admin-notes-show-more}" Visible="False" HorizontalAlignment="Center" /> <Button Name="ShowMoreButton" Text="{Loc admin-notes-show-more}" Visible="False" HorizontalAlignment="Center" />
<Button Name="NewNoteButton" Text="{Loc admin-notes-new-note}" Disabled="True" /> <Button Name="NewNoteButton" Access="Public" Text="{Loc admin-notes-new-note}" Disabled="True" />
</BoxContainer> </BoxContainer>
</PanelContainer> </PanelContainer>
</Control> </Control>

View File

@@ -3,7 +3,7 @@
Title="Loading..." Title="Loading..."
MinSize="400 200"> MinSize="400 200">
<BoxContainer Orientation="Vertical" Margin="4"> <BoxContainer Orientation="Vertical" Margin="4">
<TextEdit Name="NoteTextEdit" HorizontalExpand="True" VerticalExpand="True" /> <TextEdit Name="NoteTextEdit" Access="Public" HorizontalExpand="True" VerticalExpand="True" />
<BoxContainer Orientation="Horizontal" HorizontalExpand="True"> <BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Label Name="ExpiryLabel" Text="{Loc admin-note-editor-expiry-label}" Visible="False" /> <Label Name="ExpiryLabel" Text="{Loc admin-note-editor-expiry-label}" Visible="False" />
<HistoryLineEdit Name="ExpiryLineEdit" PlaceHolder="{Loc admin-note-editor-expiry-placeholder}" <HistoryLineEdit Name="ExpiryLineEdit" PlaceHolder="{Loc admin-note-editor-expiry-placeholder}"
@@ -17,7 +17,7 @@
ToolTip="{Loc admin-note-editor-secret-tooltip}" /> ToolTip="{Loc admin-note-editor-secret-tooltip}" />
<CheckBox Name="PermanentCheckBox" Pressed="True" Text="{Loc admin-note-editor-expiry-checkbox}" <CheckBox Name="PermanentCheckBox" Pressed="True" Text="{Loc admin-note-editor-expiry-checkbox}"
ToolTip="{Loc admin-note-editor-expiry-checkbox-tooltip}" /> ToolTip="{Loc admin-note-editor-expiry-checkbox-tooltip}" />
<Button Name="SubmitButton" Text="{Loc admin-note-editor-submit}" HorizontalAlignment="Right" /> <Button Name="SubmitButton" Access="Public" Text="{Loc admin-note-editor-submit}" HorizontalAlignment="Right" />
</BoxContainer> </BoxContainer>
</BoxContainer> </BoxContainer>
</controls:FancyWindow> </controls:FancyWindow>

View File

@@ -133,7 +133,7 @@ public sealed partial class NoteEdit : FancyWindow
private bool IsSecret { get; set; } private bool IsSecret { get; set; }
private NoteType NoteType { get; set; } private NoteType NoteType { get; set; }
private NoteSeverity? NoteSeverity public NoteSeverity? NoteSeverity
{ {
get => _noteSeverity; get => _noteSeverity;
set set

View File

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

View File

@@ -7,10 +7,8 @@
MinSize="50 50"> MinSize="50 50">
<BoxContainer Orientation="Vertical"> <BoxContainer Orientation="Vertical">
<GridContainer Columns="3"> <GridContainer Columns="3">
<cc:UICommandButton Command="kick" Text="{Loc admin-player-actions-window-title}" WindowType="{x:Type at:PlayerActionsWindow}" />
<cc:CommandButton Command="banpanel" Text="{Loc admin-player-actions-window-ban}" /> <cc:CommandButton Command="banpanel" Text="{Loc admin-player-actions-window-ban}" />
<cc:CommandButton Command="aghost" Text="{Loc admin-player-actions-window-admin-ghost}" /> <cc:CommandButton Command="aghost" Text="{Loc admin-player-actions-window-admin-ghost}" />
<cc:UICommandButton Command="tpto" Text="{Loc admin-player-actions-window-teleport}" WindowType="{x:Type at:TeleportWindow}" />
<cc:CommandButton Command="permissions" Text="{Loc admin-player-actions-window-permissions}" /> <cc:CommandButton Command="permissions" Text="{Loc admin-player-actions-window-permissions}" />
<cc:CommandButton Command="announceui" Text="{Loc admin-player-actions-window-announce}"/> <cc:CommandButton Command="announceui" Text="{Loc admin-player-actions-window-announce}"/>
<cc:UICommandButton Command="callshuttle" Text="{Loc admin-player-actions-window-shuttle}" WindowType="{x:Type at:AdminShuttleWindow}"/> <cc:UICommandButton Command="callshuttle" Text="{Loc admin-player-actions-window-shuttle}" WindowType="{x:Type at:AdminShuttleWindow}"/>

View File

@@ -1,19 +0,0 @@
<DefaultWindow
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc admin-player-actions-window-title}" MinSize="425 272">
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc admin-player-actions-reason}" MinWidth="100" />
<Control MinWidth="50" />
<LineEdit Name="ReasonLine" MinWidth="100" HorizontalExpand="True" />
</BoxContainer>
<cc:PlayerListControl Name="PlayerList" VerticalExpand="True" />
<BoxContainer Orientation="Horizontal">
<controls:ConfirmButton Name="SubmitKickButton" Text="{Loc admin-player-actions-kick}" ConfirmationText="{Loc 'admin-player-actions-confirm'}" Disabled="True"/>
<Button Name="SubmitAHelpButton" Text="{Loc admin-player-actions-ahelp}" Disabled="True"/>
<controls:ConfirmButton Name="SubmitRespawnButton" Text="{Loc admin-player-actions-respawn}" ConfirmationText="{Loc 'admin-player-actions-confirm'}" Disabled="True"/>
</BoxContainer>
</BoxContainer>
</DefaultWindow>

View File

@@ -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<IClientConsoleHost>().ExecuteCommand(
$"kick \"{_selectedPlayer.Username}\" \"{CommandParsing.Escape(ReasonLine.Text)}\"");
}
private void SubmitAhelpButtonOnPressed(BaseButton.ButtonEventArgs obj)
{
if (_selectedPlayer == null)
return;
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
$"openahelp \"{_selectedPlayer.SessionId}\"");
}
private void SubmitRespawnButtonOnPressed(BaseButton.ButtonEventArgs obj)
{
if (_selectedPlayer == null)
return;
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
$"respawn \"{_selectedPlayer.Username}\"");
}
}
}

View File

@@ -1,9 +0,0 @@
<DefaultWindow
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
Title="{Loc admin-ui-teleport}" MinSize="425 230">
<BoxContainer Orientation="Vertical">
<cc:PlayerListControl Name="PlayerList" />
<Button Name="SubmitButton" Text="{Loc admin-ui-teleport}" />
</BoxContainer>
</DefaultWindow>

View File

@@ -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<IClientConsoleHost>().ExecuteCommand(
$"tpto \"{_selectedPlayer.Username}\"");
}
}
}

View File

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

View File

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

View File

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

View File

@@ -1,3 +1,4 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Content.Tests")] [assembly: InternalsVisibleTo("Content.Tests")]
[assembly: InternalsVisibleTo("Content.IntegrationTests")]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
using Content.Client.Stylesheets; using Content.Client.Stylesheets.Palette;
using Content.Client.UserInterface.Controls; using Content.Client.UserInterface.Controls;
using Content.Shared.Changeling.Components; using Content.Shared.Changeling.Components;
using Content.Shared.Changeling.Systems; 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) public sealed partial class ChangelingTransformBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
{ {
private SimpleRadialMenu? _menu; private SimpleRadialMenu? _menu;
private static readonly Color SelectedOptionBackground = StyleNano.ButtonColorGoodDefault.WithAlpha(128); private static readonly Color SelectedOptionBackground = Palettes.Green.Element.WithAlpha(128);
private static readonly Color SelectedOptionHoverBackground = StyleNano.ButtonColorGoodHovered.WithAlpha(128); private static readonly Color SelectedOptionHoverBackground = Palettes.Green.HoveredElement.WithAlpha(128);
protected override void Open() protected override void Open()
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,14 +0,0 @@
using Content.Shared.Crayon;
using Robust.Shared.GameObjects;
using Robust.Shared.ViewVariables;
namespace Content.Client.Crayon
{
[RegisterComponent]
public sealed partial class CrayonComponent : SharedCrayonComponent
{
[ViewVariables(VVAccess.ReadWrite)] public bool UIUpdateNeeded;
[ViewVariables] public int Charges { get; set; }
[ViewVariables] public int Capacity { get; set; }
}
}

View File

@@ -1,67 +1,52 @@
using Content.Client.Items; using Content.Client.Items;
using Content.Client.Message; using Content.Client.Message;
using Content.Client.Stylesheets; using Content.Client.Stylesheets;
using Content.Shared.Charges.Components;
using Content.Shared.Charges.Systems;
using Content.Shared.Crayon; using Content.Shared.Crayon;
using Robust.Client.UserInterface; using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Localization;
using Robust.Shared.Timing; using Robust.Shared.Timing;
namespace Content.Client.Crayon; namespace Content.Client.Crayon;
public sealed class CrayonSystem : SharedCrayonSystem public sealed class CrayonSystem : SharedCrayonSystem
{ {
// Didn't do in shared because I don't think most of the server stuff can be predicted. [Dependency] private readonly SharedChargesSystem _charges = default!;
[Dependency] private readonly EntityManager _entityManager = default!;
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
SubscribeLocalEvent<CrayonComponent, ComponentHandleState>(OnCrayonHandleState);
Subs.ItemStatus<CrayonComponent>(ent => new StatusControl(ent));
}
private static void OnCrayonHandleState(EntityUid uid, CrayonComponent component, ref ComponentHandleState args) Subs.ItemStatus<CrayonComponent>(ent => new StatusControl(ent, _charges, _entityManager));
{
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;
} }
private sealed class StatusControl : Control private sealed class StatusControl : Control
{ {
private readonly CrayonComponent _parent; private readonly Entity<CrayonComponent> _crayon;
private readonly SharedChargesSystem _charges;
private readonly RichTextLabel _label; private readonly RichTextLabel _label;
private readonly int _capacity;
public StatusControl(CrayonComponent parent) public StatusControl(Entity<CrayonComponent> crayon, SharedChargesSystem charges, EntityManager entityManage)
{ {
_parent = parent; _crayon = crayon;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; _charges = charges;
_capacity = entityManage.GetComponent<LimitedChargesComponent>(_crayon.Owner).MaxCharges;
_label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label); AddChild(_label);
parent.UIUpdateNeeded = true;
} }
protected override void FrameUpdate(FrameEventArgs args) protected override void FrameUpdate(FrameEventArgs args)
{ {
base.FrameUpdate(args); base.FrameUpdate(args);
if (!_parent.UIUpdateNeeded)
{
return;
}
_parent.UIUpdateNeeded = false;
_label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label", _label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label",
("color",_parent.Color), ("color",_crayon.Comp.Color),
("state",_parent.SelectedState), ("state",_crayon.Comp.SelectedState),
("charges", _parent.Charges), ("charges", _charges.GetCurrentCharges(_crayon.Owner)),
("capacity",_parent.Capacity))); ("capacity", _capacity)));
} }
} }
} }

View File

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

View File

@@ -100,11 +100,11 @@ public sealed partial class CreditsWindow : DefaultWindow
var container = new BoxContainer { Orientation = LayoutOrientation.Horizontal }; 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 += previousPageButton.OnPressed +=
_ => PopulateAttributions(attributionsContainer, count - AttributionsSourcesPerPage); _ => 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 += nextPageButton.OnPressed +=
_ => PopulateAttributions(attributionsContainer, count + AttributionsSourcesPerPage); _ => 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)) foreach (var entry in CreditsManager.GetLicenses(_resourceManager).OrderBy(p => p.Name))
{ {
licensesContainer.AddChild(new Label licensesContainer.AddChild(new Label
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = entry.Name }); { StyleClasses = { StyleClass.LabelHeading }, Text = entry.Name });
// We split these line by line because otherwise // We split these line by line because otherwise
// the LGPL causes Clyde to go out of bounds in the rendering code. // the LGPL causes Clyde to go out of bounds in the rendering code.
@@ -299,7 +299,7 @@ public sealed partial class CreditsWindow : DefaultWindow
first = false; first = false;
patronsContainer.AddChild(new Label patronsContainer.AddChild(new Label
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = $"{tier.Key}" }); { StyleClasses = { StyleClass.LabelHeading }, Text = $"{tier.Key}" });
var msg = string.Join(", ", tier.OrderBy(p => p.Name).Select(p => p.Name)); var msg = string.Join(", ", tier.OrderBy(p => p.Name).Select(p => p.Name));
@@ -347,7 +347,7 @@ public sealed partial class CreditsWindow : DefaultWindow
first = false; first = false;
ss14ContributorsContainer.AddChild(new Label ss14ContributorsContainer.AddChild(new Label
{ StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = title }); { StyleClasses = { StyleClass.LabelHeading }, Text = title });
var label = new RichTextLabel(); var label = new RichTextLabel();
var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}"); var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}");

View File

@@ -58,7 +58,7 @@
StyleClasses="LabelBig" /> StyleClasses="LabelBig" />
<BoxContainer Orientation="Horizontal" <BoxContainer Orientation="Horizontal"
Margin="0 0 0 5"> Margin="0 0 0 5">
<Label Text="{Loc 'crew-monitoring-user-interface-job'}" <Label Text="{Loc 'crew-monitoring-ui-job-label'}"
FontColorOverride="DarkGray" /> FontColorOverride="DarkGray" />
<TextureRect Name="PersonJobIcon" <TextureRect Name="PersonJobIcon"
TextureScale="2 2" TextureScale="2 2"

View File

@@ -276,7 +276,7 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
private void SetStatus(SecurityStatus status) private void SetStatus(SecurityStatus status)
{ {
if (status == SecurityStatus.Wanted || status == SecurityStatus.Suspected) if (status == SecurityStatus.Wanted || status == SecurityStatus.Suspected || status == SecurityStatus.Hostile)
{ {
GetReason(status); GetReason(status);
return; return;
@@ -322,6 +322,8 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
SecurityStatus.Detained => "hud_incarcerated", SecurityStatus.Detained => "hud_incarcerated",
SecurityStatus.Discharged => "hud_discharged", SecurityStatus.Discharged => "hud_discharged",
SecurityStatus.Suspected => "hud_suspected", SecurityStatus.Suspected => "hud_suspected",
SecurityStatus.Hostile => "hud_hostile",
SecurityStatus.Eliminated => "hud_eliminated",
_ => "SecurityIconNone" _ => "SecurityIconNone"
}; };
} }

View File

@@ -0,0 +1,5 @@
using Content.Shared.Damage.Systems;
namespace Content.Client.Damage.Systems;
public sealed class DamageOtherOnHitSystem : SharedDamageOtherOnHitSystem;

View File

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

View File

@@ -68,7 +68,7 @@ public sealed class DoorSystem : SharedDoorSystem
{ {
new AnimationTrackSpriteFlick new AnimationTrackSpriteFlick
{ {
LayerKey = DoorVisualLayers.BaseUnlit, LayerKey = DoorVisualLayers.BaseEmagging,
KeyFrames = KeyFrames =
{ {
new AnimationTrackSpriteFlick.KeyFrame(comp.EmaggingSpriteState, 0f), new AnimationTrackSpriteFlick.KeyFrame(comp.EmaggingSpriteState, 0f),
@@ -92,6 +92,10 @@ public sealed class DoorSystem : SharedDoorSystem
if (_animationSystem.HasRunningAnimation(entity, DoorComponent.AnimationKey)) if (_animationSystem.HasRunningAnimation(entity, DoorComponent.AnimationKey))
_animationSystem.Stop(entity.Owner, 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); UpdateAppearanceForDoorState(entity, args.Sprite, state);
} }
@@ -134,7 +138,9 @@ public sealed class DoorSystem : SharedDoorSystem
return; return;
case DoorState.Emagging: 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; return;
} }

View File

@@ -27,6 +27,15 @@ public sealed class DrunkOverlay : Overlay
private const float VisualThreshold = 10.0f; private const float VisualThreshold = 10.0f;
private const float PowerDivisor = 250.0f; private const float PowerDivisor = 250.0f;
/// <remarks>
/// 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.
/// </remarks>
private const float MaxBoozePower = 100f;
private const float BoozePowerScale = 8f;
private float _visualScale = 0; private float _visualScale = 0;
@@ -50,15 +59,9 @@ public sealed class DrunkOverlay : Overlay
var time = status.Item2; 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) CurrentBoozePower += BoozePowerScale * (power - CurrentBoozePower) * args.DeltaSeconds / (power+1);
{
var curTime = _timing.CurTime;
power = (float) (time - curTime).Value.TotalSeconds;
}
CurrentBoozePower += 8f * (power * 0.5f - CurrentBoozePower) * args.DeltaSeconds / (power+1);
} }
protected override bool BeforeDraw(in OverlayDrawArgs args) protected override bool BeforeDraw(in OverlayDrawArgs args)

View File

@@ -154,12 +154,6 @@ namespace Content.Client.Entry
_configManager.SetCVar("interface.resolutionAutoScaleMinimum", 0.5f); _configManager.SetCVar("interface.resolutionAutoScaleMinimum", 0.5f);
} }
public override void Shutdown()
{
base.Shutdown();
_titleWindowManager.Shutdown();
}
public override void PostInit() public override void PostInit()
{ {
base.PostInit(); base.PostInit();

View File

@@ -56,7 +56,7 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Scale="0.9 0.9" Scale="0.9 0.9"
StyleClasses="Refresh" /> StyleClasses="RefreshButton" />
</Button> </Button>
</BoxContainer> </BoxContainer>
</BoxContainer> </BoxContainer>

View File

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

View File

@@ -15,48 +15,29 @@ public sealed class TitleWindowManager
public void Initialize() public void Initialize()
{ {
_cfg.OnValueChanged(CVars.GameHostName, OnHostnameChange, true); _cfg.OnValueChanged(CVars.GameHostName, _ => OnHostnameChange(), true);
_cfg.OnValueChanged(CCVars.GameHostnameInTitlebar, OnHostnameTitleChange, true); _cfg.OnValueChanged(CCVars.GameHostnameInTitlebar, _ => OnHostnameChange(), true);
_client.RunLevelChanged += OnRunLevelChangedChange; _client.RunLevelChanged += (_, _) => OnHostnameChange();
} }
public void Shutdown() private void OnHostnameChange()
{
_cfg.UnsubValueChanged(CVars.GameHostName, OnHostnameChange);
_cfg.UnsubValueChanged(CCVars.GameHostnameInTitlebar, OnHostnameTitleChange);
}
private void OnHostnameChange(string hostname)
{ {
var defaultWindowTitle = _gameController.GameTitle(); var defaultWindowTitle = _gameController.GameTitle();
// Since the game assumes the server name is MyServer and that GameHostnameInTitlebar CCVar is true by default // When the client starts connecting, it will be using either the default hostname, or whatever hostname
// Lets just... not show anything. This also is used to revert back to just the game title on disconnect. // is set in its config file (aka the last server they connected to) until it receives the latest cvars.
if (_client.RunLevel == ClientRunLevel.Initialize) // 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); _clyde.SetWindowTitle(defaultWindowTitle);
return; return;
} }
if (_cfg.GetCVar(CCVars.GameHostnameInTitlebar)) _clyde.SetWindowTitle(
// If you really dislike the dash I guess change it here _cfg.GetCVar(CCVars.GameHostnameInTitlebar)
_clyde.SetWindowTitle(hostname + " - " + defaultWindowTitle); ? _cfg.GetCVar(CVars.GameHostName) + " - " + defaultWindowTitle
else : defaultWindowTitle);
_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));
} }
// You thought I would remove the :3 from this code? You were wrong.
} }

View File

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

View File

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

View File

@@ -0,0 +1,18 @@
<Control xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls">
<PanelContainer HorizontalExpand="True" Margin="5 5 5 5">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BorderThickness="1" BorderColor="#777777"/>
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical" Margin="5 5 5 5" Name="LawsetContainer">
<PanelContainer Name="NameBackground">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#16168C"/>
</PanelContainer.PanelOverride>
<RichTextLabel Name="LawsetName" HorizontalAlignment="Center"/>
</PanelContainer>
<!--RichTextLabels containing the individual laws are inserted here-->
</BoxContainer>
</PanelContainer>
</Control>

View File

@@ -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;
/// <summary>
/// Control for embedding an AI Lawset in a guidebook
/// </summary>
[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<SiliconLawPrototype>(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<string, string> 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<SiliconLawsetPrototype>(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;
}
}

View File

@@ -0,0 +1,5 @@
<Control xmlns="https://spacestation14.io">
<BoxContainer Orientation="Vertical"
Name="GroupContainer">
</BoxContainer>
</Control>

View File

@@ -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;
/// <summary>
/// Control for iterating and embedding every SiliconLawsetPrototype into the guidebook.
/// </summary>
[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<string, string> args, [NotNullWhen(true)] out Control? control)
{
foreach (var lawset in _prototype.EnumeratePrototypes<SiliconLawsetPrototype>().OrderBy(x => x.ID))
{
GuideLawsetEmbed embed = new(lawset);
GroupContainer.AddChild(embed);
}
control = this;
return true;
}
}

View File

@@ -4,11 +4,11 @@
<BoxContainer Orientation="Vertical" HorizontalExpand="True"> <BoxContainer Orientation="Vertical" HorizontalExpand="True">
<humanoid:MarkingPicker Name="MarkingPickerWidget" /> <humanoid:MarkingPicker Name="MarkingPickerWidget" />
<BoxContainer> <BoxContainer>
<CheckBox Name="MarkingForced" Text="Force" Pressed="True" /> <CheckBox Name="MarkingForced" Text="{Loc humanoid-marking-modifier-force}" Pressed="True" />
<CheckBox Name="MarkingIgnoreSpecies" Text="Ignore Species" Pressed="True" /> <CheckBox Name="MarkingIgnoreSpecies" Text="{Loc humanoid-marking-modifier-ignore-species}" Pressed="True" />
</BoxContainer> </BoxContainer>
<Collapsible HorizontalExpand="True"> <Collapsible HorizontalExpand="True">
<CollapsibleHeading Title="Base layers" /> <CollapsibleHeading Title="{Loc humanoid-marking-modifier-base-layers}" />
<CollapsibleBody HorizontalExpand="True"> <CollapsibleBody HorizontalExpand="True">
<BoxContainer Name="BaseLayersContainer" Orientation="Vertical" HorizontalExpand="True" /> <BoxContainer Name="BaseLayersContainer" Orientation="Vertical" HorizontalExpand="True" />
</CollapsibleBody> </CollapsibleBody>

View File

@@ -118,7 +118,7 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
}); });
_enable = new CheckBox _enable = new CheckBox
{ {
Text = "Enable", Text = Loc.GetString("humanoid-marking-modifier-enable"),
HorizontalAlignment = HAlignment.Right HorizontalAlignment = HAlignment.Right
}; };
@@ -134,8 +134,8 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
OnStateChanged!(); OnStateChanged!();
}; };
var lineEditBox = new BoxContainer(); var lineEditBox = new BoxContainer { SeparationOverride = 4 };
lineEditBox.AddChild(new Label { Text = "Prototype id: "}); 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. // TODO: This line edit should really be an options / dropdown selector, not text.
_lineEdit = new() { MinWidth = 200 }; _lineEdit = new() { MinWidth = 200 };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -33,6 +33,7 @@ namespace Content.Client.Labels.UI
_window.OnLabelChanged += OnLabelChanged; _window.OnLabelChanged += OnLabelChanged;
Reload(); Reload();
_window.SetInitialLabelState(); // Must be after Reload() has set the label text
} }
private void OnLabelChanged(string newLabel) private void OnLabelChanged(string newLabel)

View File

@@ -1,8 +1,14 @@
<DefaultWindow xmlns="https://spacestation14.io" <DefaultWindow xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{Loc 'hand-labeler-ui-header'}"> Title="{Loc 'hand-labeler-ui-header'}"
<BoxContainer Orientation="Vertical" SeparationOverride="4" MinWidth="150"> SetWidth="400"
MinWidth="150">
<BoxContainer Orientation="Vertical" SeparationOverride="4">
<Label Name="CurrentTextLabel" Text="{Loc 'hand-labeler-current-text-label'}" /> <Label Name="CurrentTextLabel" Text="{Loc 'hand-labeler-current-text-label'}" />
<LineEdit Name="LabelLineEdit" /> <LineEdit Name="LabelLineEdit" />
<BoxContainer Orientation="Horizontal" Align="Center">
<Button Name="ResetLabelButton" Text="{Loc 'hand-labeler-ui-reset-label-text'}" StyleClasses="OpenRight" />
<Button Name="ClearLabelButton" Text="{Loc 'hand-labeler-ui-clear-label-text'}" StyleClasses="OpenLeft" />
</BoxContainer>
</BoxContainer> </BoxContainer>
</DefaultWindow> </DefaultWindow>

View File

@@ -16,6 +16,7 @@ namespace Content.Client.Labels.UI
// TODO LineEdit Make this a bool on the LineEdit control // TODO LineEdit Make this a bool on the LineEdit control
private string _label = string.Empty; private string _label = string.Empty;
private string _initialLabel = string.Empty;
public HandLabelerWindow() public HandLabelerWindow()
{ {
@@ -25,6 +26,7 @@ namespace Content.Client.Labels.UI
{ {
_label = e.Text; _label = e.Text;
OnLabelChanged?.Invoke(_label); OnLabelChanged?.Invoke(_label);
UpdateButtons();
}; };
LabelLineEdit.OnFocusEnter += _ => _focused = true; LabelLineEdit.OnFocusEnter += _ => _focused = true;
@@ -33,12 +35,14 @@ namespace Content.Client.Labels.UI
_focused = false; _focused = false;
LabelLineEdit.Text = _label; LabelLineEdit.Text = _label;
}; };
ResetLabelButton.OnPressed += _ => LabelLineEdit.SetText(_initialLabel, true);
ClearLabelButton.OnPressed += _ => LabelLineEdit.SetText("", true);
} }
protected override void Opened() protected override void Opened()
{ {
base.Opened(); base.Opened();
// Give the editor keyboard focus, since that's the only // Give the editor keyboard focus, since that's the only
// thing the user will want to be doing with this UI // thing the user will want to be doing with this UI
LabelLineEdit.GrabKeyboardFocus(); LabelLineEdit.GrabKeyboardFocus();
@@ -51,7 +55,25 @@ namespace Content.Client.Labels.UI
_label = label; _label = label;
if (!_focused) if (!_focused)
{
LabelLineEdit.Text = label; 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) public void SetMaxLabelLength(int maxLength)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,8 +6,8 @@ using Content.Client.Lobby.UI.Loadouts;
using Content.Client.Lobby.UI.Roles; using Content.Client.Lobby.UI.Roles;
using Content.Client.Message; using Content.Client.Message;
using Content.Client.Players.PlayTimeTracking; using Content.Client.Players.PlayTimeTracking;
using Content.Client.Sprite;
using Content.Client.Stylesheets; using Content.Client.Stylesheets;
using Content.Client.Sprite;
using Content.Client.UserInterface.Systems.Guidebook; using Content.Client.UserInterface.Systems.Guidebook;
using Content.Shared.CCVar; using Content.Shared.CCVar;
using Content.Shared.Clothing; using Content.Shared.Clothing;
@@ -598,7 +598,7 @@ namespace Content.Client.Lobby.UI
{ {
Text = Loc.GetString(category.Name), Text = Loc.GetString(category.Name),
Margin = new Thickness(0, 10, 0, 0), Margin = new Thickness(0, 10, 0, 0),
StyleClasses = { StyleBase.StyleClassLabelHeading }, StyleClasses = { StyleClass.LabelHeading },
}); });
} }
@@ -666,6 +666,7 @@ namespace Content.Client.Lobby.UI
_species.Clear(); _species.Clear();
_species.AddRange(_prototypeManager.EnumeratePrototypes<SpeciesPrototype>().Where(o => o.RoundStart)); _species.AddRange(_prototypeManager.EnumeratePrototypes<SpeciesPrototype>().Where(o => o.RoundStart));
_species.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.CurrentCultureIgnoreCase));
var speciesIds = _species.Select(o => o.ID).ToList(); var speciesIds = _species.Select(o => o.ID).ToList();
for (var i = 0; i < _species.Count; i++) for (var i = 0; i < _species.Count; i++)
@@ -1420,7 +1421,7 @@ namespace Content.Client.Lobby.UI
return; return;
const string style = "SpeciesInfoDefault"; const string style = "SpeciesInfoDefault";
SpeciesInfoButton.StyleClasses.Add(style); SpeciesInfoButton.StyleIdentifier = style;
} }
private void UpdateMarkings() private void UpdateMarkings()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -62,7 +62,7 @@ public sealed partial class CrewMonitoringNavMapControl : NavMapControl
continue; continue;
if (!LocalizedNames.TryGetValue(netEntity, out var name)) if (!LocalizedNames.TryGetValue(netEntity, out var name))
name = "Unknown"; name = Loc.GetString("navmap-unknown-entity");
var message = name + "\n" + Loc.GetString("navmap-location", var message = name + "\n" + Loc.GetString("navmap-location",
("x", MathF.Round(blip.Coordinates.X)), ("x", MathF.Round(blip.Coordinates.X)),

View File

@@ -1,7 +1,7 @@
<controls:FancyWindow xmlns="https://spacestation14.io" <controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:ui="clr-namespace:Content.Client.Medical.CrewMonitoring" xmlns:ui="clr-namespace:Content.Client.Medical.CrewMonitoring"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'crew-monitoring-user-interface-title'}" Title="{Loc crew-monitoring-ui-title}"
Resizable="False" Resizable="False"
SetSize="1210 700" SetSize="1210 700"
MinSize="1210 700"> MinSize="1210 700">
@@ -11,12 +11,12 @@
<BoxContainer Orientation="Vertical" Margin="0 0 10 0"> <BoxContainer Orientation="Vertical" Margin="0 0 10 0">
<controls:StripeBack> <controls:StripeBack>
<PanelContainer> <PanelContainer>
<Label Name="StationName" Text="Unknown station" Align="Center" Margin="0 5 0 3"/> <Label Name="StationName" Text="{Loc crew-monitoring-ui-no-station-label}" Align="Center" Margin="0 5 0 3"/>
</PanelContainer> </PanelContainer>
</controls:StripeBack> </controls:StripeBack>
<LineEdit Name="SearchLineEdit" HorizontalExpand="True" <LineEdit Name="SearchLineEdit" HorizontalExpand="True"
PlaceHolder="{Loc crew-monitor-filter-line-placeholder}" /> PlaceHolder="{Loc crew-monitoring-ui-filter-line-placeholder}" />
<ScrollContainer Name="SensorScroller" <ScrollContainer Name="SensorScroller"
VerticalExpand="True" VerticalExpand="True"
@@ -29,7 +29,7 @@
<!-- Table rows are filled by code --> <!-- Table rows are filled by code -->
</BoxContainer> </BoxContainer>
<Label Name="NoServerLabel" <Label Name="NoServerLabel"
Text="{Loc 'crew-monitoring-user-interface-no-server'}" Text="{Loc crew-monitoring-ui-no-server-label}"
StyleClasses="LabelHeading" StyleClasses="LabelHeading"
FontColorOverride="Red" FontColorOverride="Red"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -42,8 +42,8 @@
<BoxContainer Orientation="Vertical"> <BoxContainer Orientation="Vertical">
<PanelContainer StyleClasses="LowDivider" /> <PanelContainer StyleClasses="LowDivider" />
<BoxContainer Orientation="Horizontal" Margin="10 2 5 0" VerticalAlignment="Bottom"> <BoxContainer Orientation="Horizontal" Margin="10 2 5 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'crew-monitoring-user-interface-flavor-left'}" StyleClasses="WindowFooterText" /> <Label Text="{Loc crew-monitoring-ui-flavor-left-label}" StyleClasses="WindowFooterText" />
<Label Text="{Loc 'crew-monitoring-user-interface-flavor-right'}" StyleClasses="WindowFooterText" <Label Text="{Loc crew-monitoring-ui-flavor-right-label}" StyleClasses="WindowFooterText"
HorizontalAlignment="Right" HorizontalExpand="True" Margin="0 0 5 0" /> HorizontalAlignment="Right" HorizontalExpand="True" Margin="0 0 5 0" />
<TextureRect StyleClasses="NTLogoDark" Stretch="KeepAspectCentered" <TextureRect StyleClasses="NTLogoDark" Stretch="KeepAspectCentered"
VerticalAlignment="Center" HorizontalAlignment="Right" SetSize="19 19"/> VerticalAlignment="Center" HorizontalAlignment="Right" SetSize="19 19"/>

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