diff --git a/Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs b/Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs
index 9eb989f715..1ef9158aeb 100644
--- a/Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs
+++ b/Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs
@@ -5,7 +5,6 @@ using Content.Shared.CrewManifest;
using Robust.Client.GameObjects;
using Robust.Shared.Prototypes;
using static Content.Shared.Access.Components.SharedIdCardConsoleComponent;
-
namespace Content.Client.Access.UI
{
public sealed class IdCardConsoleBoundUserInterface : BoundUserInterface
@@ -16,7 +15,6 @@ namespace Content.Client.Access.UI
public IdCardConsoleBoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
{
}
-
private IdCardConsoleWindow? _window;
protected override void Open()
diff --git a/Content.Client/Power/APC/ApcBoundUserInterface.cs b/Content.Client/Power/APC/ApcBoundUserInterface.cs
index 65ba4c7ec0..d85edb8d1a 100644
--- a/Content.Client/Power/APC/ApcBoundUserInterface.cs
+++ b/Content.Client/Power/APC/ApcBoundUserInterface.cs
@@ -16,7 +16,7 @@ namespace Content.Client.Power.APC
{
base.Open();
- _menu = new ApcMenu(this);
+ _menu = new ApcMenu(this,Owner);
_menu.OnClose += Close;
_menu.OpenCentered();
}
diff --git a/Content.Client/Power/APC/UI/ApcMenu.xaml b/Content.Client/Power/APC/UI/ApcMenu.xaml
index 5926b5de4c..0ce4a943da 100644
--- a/Content.Client/Power/APC/UI/ApcMenu.xaml
+++ b/Content.Client/Power/APC/UI/ApcMenu.xaml
@@ -1,28 +1,59 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HorizontalExpand="True"
+ MinValue="0"
+ MaxValue="1"
+ MinHeight = "25"
+ Page="0"
+ Margin="10 10 0 0"
+ Value="0.5">
+
-
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/Content.Client/Power/APC/UI/ApcMenu.xaml.cs b/Content.Client/Power/APC/UI/ApcMenu.xaml.cs
index 1a33b41635..15b3e0b67d 100644
--- a/Content.Client/Power/APC/UI/ApcMenu.xaml.cs
+++ b/Content.Client/Power/APC/UI/ApcMenu.xaml.cs
@@ -1,25 +1,29 @@
using Robust.Client.AutoGenerated;
-using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
+using Robust.Client.GameObjects;
using Robust.Shared.IoC;
using System;
using Content.Client.Stylesheets;
using Content.Shared.APC;
using Robust.Client.Graphics;
+using Robust.Client.UserInterface.Controls;
using Robust.Shared.GameObjects;
using Robust.Shared.Localization;
using Robust.Shared.Maths;
+using FancyWindow = Content.Client.UserInterface.Controls.FancyWindow;
namespace Content.Client.Power.APC.UI
{
[GenerateTypedNameReferences]
- public sealed partial class ApcMenu : DefaultWindow
+ public sealed partial class ApcMenu : FancyWindow
{
- public ApcMenu(ApcBoundUserInterface owner)
+ [Dependency] private readonly IEntityManager _entityManager = default!;
+ public ApcMenu(ApcBoundUserInterface owner, ClientUserInterfaceComponent component)
{
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);
+ EntityView.Sprite = _entityManager.GetComponent(component.Owner);
BreakerButton.OnPressed += _ => owner.BreakerPressed();
}
@@ -29,12 +33,22 @@ namespace Content.Client.Power.APC.UI
if (BreakerButton != null)
{
- BreakerButton.Pressed = castState.MainBreaker;
+ if(castState.HasAccess == false)
+ {
+ BreakerButton.Disabled = true;
+ BreakerButton.ToolTip = Loc.GetString("apc-component-insufficient-access");
+ }
+ else
+ {
+ BreakerButton.Disabled = false;
+ BreakerButton.ToolTip = null;
+ BreakerButton.Pressed = castState.MainBreaker;
+ }
}
if (PowerLabel != null)
{
- PowerLabel.Text = Loc.GetString("apc-menu-power-label", ("power", castState.Power));
+ PowerLabel.Text = castState.Power + "W";
}
if (ExternalPowerStateLabel != null)
@@ -62,12 +76,8 @@ namespace Content.Client.Power.APC.UI
{
ChargeBar.Value = castState.Charge;
UpdateChargeBarColor(castState.Charge);
-
- if (APCMenu != null)
- {
- var chargePercentage = (castState.Charge / ChargeBar.MaxValue) * 100.0f;
- ChargePercentage.Text = " " + chargePercentage.ToString("0.00") + "%";
- }
+ var chargePercentage = (castState.Charge / ChargeBar.MaxValue);
+ ChargePercentage.Text = Loc.GetString("apc-menu-charge-label",("percent", chargePercentage.ToString("P0")));
}
}
diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs
index 7d2fb429f7..58f68ff458 100644
--- a/Content.Client/Stylesheets/StyleNano.cs
+++ b/Content.Client/Stylesheets/StyleNano.cs
@@ -138,6 +138,7 @@ namespace Content.Client.Stylesheets
public StyleNano(IResourceCache resCache) : base(resCache)
{
+ var notoSans8 = resCache.NotoStack(size: 8);
var notoSans10 = resCache.NotoStack(size: 10);
var notoSansItalic10 = resCache.NotoStack(variation: "Italic", size: 10);
var notoSans12 = resCache.NotoStack(size: 12);
@@ -1303,6 +1304,7 @@ namespace Content.Client.Stylesheets
ContentMarginBottomOverride = 2
}),
+ // Window Headers
Element