diff --git a/Content.Client/Construction/ConstructionMenu.cs b/Content.Client/Construction/ConstructionMenu.cs index 3d2a7cf776..d0e7a4cbd8 100644 --- a/Content.Client/Construction/ConstructionMenu.cs +++ b/Content.Client/Construction/ConstructionMenu.cs @@ -61,7 +61,6 @@ namespace Content.Client.Construction Placement = (PlacementManager)IoCManager.Resolve(); Placement.PlacementCanceled += OnPlacementCanceled; - HideOnClose = true; Title = "Construction"; Visible = false; diff --git a/Content.Client/EscapeMenuOwner.cs b/Content.Client/EscapeMenuOwner.cs index cec826486a..a10e6e65b9 100644 --- a/Content.Client/EscapeMenuOwner.cs +++ b/Content.Client/EscapeMenuOwner.cs @@ -50,8 +50,6 @@ namespace Content.Client _escapeMenu.OnClose += () => _gameHud.EscapeButtonDown = false; - _escapeMenu.AddToScreen(); - var escapeMenuCommand = InputCmdHandler.FromDelegate(Enabled); _inputManager.SetInputCommand(EngineKeyFunctions.EscapeMenu, escapeMenuCommand); @@ -68,7 +66,7 @@ namespace Content.Client private void Enabled(ICommonSession session) { - if (_escapeMenu.Visible) + if (_escapeMenu.IsOpen) { if (_escapeMenu.IsAtFront()) { diff --git a/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs b/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs index c568d25b46..426bc27c72 100644 --- a/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs +++ b/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs @@ -43,8 +43,6 @@ namespace Content.Client.GameObjects.Components.Actor var uiComponents = Owner.GetAllComponents(); Window = new CharacterWindow(uiComponents); Window.OnClose += () => _gameHud.CharacterButtonDown = false; - - Window.AddToScreen(); } /// @@ -98,7 +96,6 @@ namespace Content.Client.GameObjects.Components.Actor public CharacterWindow(IEnumerable windowComponents) { Title = "Character"; - HideOnClose = true; Visible = false; _contentsVBox = new VBoxContainer(); diff --git a/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs b/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs index 8805f76f81..7d70479146 100644 --- a/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs +++ b/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs @@ -44,7 +44,6 @@ namespace Content.Client.GameObjects.Components.Construction ConstructionMenu = new ConstructionMenu {Owner = this}; ConstructionMenu.OnClose += () => _gameHud.CraftingButtonDown = false; } - ConstructionMenu.AddToScreen(); _gameHud.CraftingButtonVisible = true; _gameHud.CraftingButtonToggled = b => diff --git a/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs b/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs index d8f6cd4d05..837b70dd95 100644 --- a/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs @@ -32,7 +32,6 @@ namespace Content.Client.GameObjects.Components.Power MarginRight = 426.0f, MarginBottom = 270.0f }; _window.OnClose += Close; - _window.AddToScreen(); _breakerButton = _window.BreakerButton; _breakerButton.OnPressed += _ => SendMessage(new ApcToggleMainBreakerMessage()); @@ -153,7 +152,7 @@ namespace Content.Client.GameObjects.Components.Power externalStatus.AddChild(externalStatusLabel); externalStatus.AddChild(ExternalPowerStateLabel); rows.AddChild(externalStatus); - + var charge = new HBoxContainer("Charge"); var chargeLabel = new Label("Label") { Text = "Charge:" }; ChargeBar = new ProgressBar("Charge") diff --git a/Content.Client/GameObjects/Components/Power/PowerDebugTool.cs b/Content.Client/GameObjects/Components/Power/PowerDebugTool.cs index 586d45acfe..d36d3be317 100644 --- a/Content.Client/GameObjects/Components/Power/PowerDebugTool.cs +++ b/Content.Client/GameObjects/Components/Power/PowerDebugTool.cs @@ -28,7 +28,6 @@ namespace Content.Client.GameObjects.Components.Power Title = "Power Debug Tool", }; LastWindow.Contents.AddChild(new Label() { Text = msg.Data }); - LastWindow.AddToScreen(); LastWindow.Open(); break; } diff --git a/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs b/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs index ed984762c8..8dd27a498c 100644 --- a/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs @@ -52,10 +52,8 @@ namespace Content.Client.GameObjects.Components.Research menu.OnClose += Close; - menu.AddToScreen(); menu.Populate(); menu.PopulateMaterials(); - queueMenu.AddToScreen(); menu.QueueButton.OnPressed += (args) => { queueMenu.OpenCentered(); }; diff --git a/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs b/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs index 7acddfa922..1227ab5c63 100644 --- a/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs +++ b/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs @@ -81,7 +81,6 @@ namespace Content.Client.GameObjects.Components.Storage /// private void OpenUI() { - Window.AddToScreen(); Window.Open(); } @@ -119,7 +118,6 @@ namespace Content.Client.GameObjects.Components.Storage base.Initialize(); Title = "Storage Item"; - HideOnClose = true; Visible = false; RectClipContent = true; diff --git a/Content.Client/GameObjects/EntitySystems/CharacterInterfaceSystem.cs b/Content.Client/GameObjects/EntitySystems/CharacterInterfaceSystem.cs index 47d86f42cc..ebf5c89129 100644 --- a/Content.Client/GameObjects/EntitySystems/CharacterInterfaceSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/CharacterInterfaceSystem.cs @@ -36,7 +36,7 @@ namespace Content.Client.GameObjects.EntitySystems var menu = characterInterface.Window; - if (menu.Visible) + if (menu.IsOpen) { if (menu.IsAtFront()) { diff --git a/Content.Client/GameObjects/EntitySystems/ConstructorSystem.cs b/Content.Client/GameObjects/EntitySystems/ConstructorSystem.cs index d4f626efb9..67a4c3b981 100644 --- a/Content.Client/GameObjects/EntitySystems/ConstructorSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/ConstructorSystem.cs @@ -36,7 +36,7 @@ namespace Content.Client.GameObjects.EntitySystems var menu = constructor.ConstructionMenu; - if (menu.Visible) + if (menu.IsOpen) { if (menu.IsAtFront()) { diff --git a/Content.Client/Research/LatheMenu.cs b/Content.Client/Research/LatheMenu.cs index 52ce852bfb..95629b2a3d 100644 --- a/Content.Client/Research/LatheMenu.cs +++ b/Content.Client/Research/LatheMenu.cs @@ -48,7 +48,6 @@ namespace Content.Client.Research base.Initialize(); IoCManager.InjectDependencies(this); - HideOnClose = true; Title = "Lathe Menu"; Visible = false; diff --git a/Content.Client/Research/LatheQueueMenu.cs b/Content.Client/Research/LatheQueueMenu.cs index e28ea9a9c6..fe8a4e5ee4 100644 --- a/Content.Client/Research/LatheQueueMenu.cs +++ b/Content.Client/Research/LatheQueueMenu.cs @@ -29,7 +29,6 @@ namespace Content.Client.Research { base.Initialize(); - HideOnClose = true; Title = "Lathe Queue"; Visible = false; diff --git a/Content.Client/UserInterface/EscapeMenu.cs b/Content.Client/UserInterface/EscapeMenu.cs index a13bae00e5..9f4f805a95 100644 --- a/Content.Client/UserInterface/EscapeMenu.cs +++ b/Content.Client/UserInterface/EscapeMenu.cs @@ -49,10 +49,8 @@ namespace Content.Client.UserInterface { Visible = false }; - optionsMenu.AddToScreen(); Resizable = false; - HideOnClose = true; Title = "Menu"; @@ -95,14 +93,12 @@ namespace Content.Client.UserInterface private void OnSpawnEntitiesButtonClicked(BaseButton.ButtonEventArgs args) { var window = new EntitySpawnWindow(_placementManager, _prototypeManager, _resourceCache); - window.AddToScreen(); window.OpenToLeft(); } private void OnSpawnTilesButtonClicked(BaseButton.ButtonEventArgs args) { var window = new TileSpawnWindow(__tileDefinitionManager, _placementManager, _resourceCache); - window.AddToScreen(); window.OpenToLeft(); } diff --git a/Content.Client/UserInterface/GameHud.cs b/Content.Client/UserInterface/GameHud.cs index 9cc508a045..f06aadf18e 100644 --- a/Content.Client/UserInterface/GameHud.cs +++ b/Content.Client/UserInterface/GameHud.cs @@ -113,14 +113,13 @@ namespace Content.Client.UserInterface _buttonCraftingMenu.OnToggled += args => CraftingButtonToggled?.Invoke(args.Pressed); _tutorialWindow = new TutorialWindow(); - _tutorialWindow.AddToScreen(); _tutorialWindow.OnClose += () => _buttonTutorial.Pressed = false; } private void ButtonTutorialOnOnToggled(BaseButton.ButtonToggledEventArgs obj) { - if (_tutorialWindow.Visible) + if (_tutorialWindow.IsOpen) { if (!_tutorialWindow.IsAtFront()) { diff --git a/Content.Client/UserInterface/TutorialWindow.cs b/Content.Client/UserInterface/TutorialWindow.cs index aa33a54572..4f69201d78 100644 --- a/Content.Client/UserInterface/TutorialWindow.cs +++ b/Content.Client/UserInterface/TutorialWindow.cs @@ -29,9 +29,6 @@ You can ask on Discord or heck, just write it in OOC! We'll catch it."; public TutorialWindow() { - HideOnClose = true; - Visible = false; - var scrollContainer = new ScrollContainer(); Contents.AddChild(scrollContainer); diff --git a/RobustToolbox b/RobustToolbox index 31ca502418..8d2ea9aed1 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 31ca50241869b70e186ad32fdb99e9bff2be44ee +Subproject commit 8d2ea9aed169a54ec6d5b29cd4ba3582a2c579b5