From 2917a87ce7de0ef809a43dbf79a7f4b3f7c0c818 Mon Sep 17 00:00:00 2001 From: moneyl <8206401+Moneyl@users.noreply.github.com> Date: Tue, 14 May 2019 23:23:00 -0400 Subject: [PATCH] Removed APC gui dependence on tscn file --- .../Components/Power/ApcBoundUserInterface.cs | 47 +++- Resources/Scenes/Power/Apc.tscn | 230 ------------------ 2 files changed, 42 insertions(+), 235 deletions(-) delete mode 100644 Resources/Scenes/Power/Apc.tscn diff --git a/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs b/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs index be9512bbdc..7159d330a3 100644 --- a/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs @@ -1,7 +1,9 @@ using System; using Content.Shared.GameObjects.Components.Power; +using OpenTK.Graphics.OpenGL4; using Robust.Client.GameObjects.Components.UserInterface; using Robust.Client.Interfaces.Graphics; +using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.GameObjects.Components.UserInterface; @@ -21,12 +23,47 @@ namespace Content.Client.GameObjects.Components.Power { base.Open(); - _window = new ApcWindow(IoCManager.Resolve()); + _window = new SS14Window(IoCManager.Resolve()) + { + MarginRight = 426.0f, MarginBottom = 270.0f + }; _window.OnClose += Close; - _breakerButton = _window.Contents.GetChild("Rows/Breaker/Breaker"); + + var rows = new VBoxContainer("Rows"); + + var statusHeader = new Label("StatusHeader") {Text = "Power Status: "}; + rows.AddChild(statusHeader); + + var breaker = new HBoxContainer("Breaker"); + var breakerLabel = new Label("Label") {Text = "Main Breaker: "}; + _breakerButton = new CheckButton(); _breakerButton.OnPressed += _ => SendMessage(new ApcToggleMainBreakerMessage()); - _externalPowerStateLabel = _window.Contents.GetChild