diff --git a/Content.Client/Content.Client.csproj b/Content.Client/Content.Client.csproj index 0c2993fad1..0e49cf09d5 100644 --- a/Content.Client/Content.Client.csproj +++ b/Content.Client/Content.Client.csproj @@ -70,6 +70,7 @@ + diff --git a/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs b/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs new file mode 100644 index 0000000000..9307b50b26 --- /dev/null +++ b/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs @@ -0,0 +1,75 @@ +using System; +using Content.Shared.GameObjects.Components.Power; +using SS14.Client.GameObjects.Components.UserInterface; +using SS14.Client.UserInterface.Controls; +using SS14.Client.UserInterface.CustomControls; +using SS14.Shared.GameObjects.Components.UserInterface; +using SS14.Shared.Utility; + +namespace Content.Client.GameObjects.Components.Power +{ + public class ApcBoundUserInterface : BoundUserInterface + { + private SS14Window _window; + private BaseButton _breakerButton; + private Label _externalPowerStateLabel; + private ProgressBar _chargeBar; + + protected override void Open() + { + base.Open(); + + _window = new ApcWindow(); + _window.OnClose += Close; + _breakerButton = _window.Contents.GetChild("Rows/Breaker/Breaker"); + _breakerButton.OnPressed += _ => SendMessage(new ApcToggleMainBreakerMessage()); + _externalPowerStateLabel = _window.Contents.GetChild