From a3ddba6f4248a3c568cf76a7260ab58b3709cf8a Mon Sep 17 00:00:00 2001 From: LordCarve <27449516+LordCarve@users.noreply.github.com> Date: Tue, 23 Sep 2025 05:40:48 +0200 Subject: [PATCH] Cleanup - Use `RemoveAllChildren()` over `DisposeAllChildren()` (#39848) * Content - change the (should-be-obsolete) DisposeAllChildren into the more robust RemoveAllChildren. * Remove duplicate calls. --------- Co-authored-by: ElectroJr --- Content.Client/Access/UI/AccessOverriderWindow.xaml.cs | 2 +- Content.Client/Access/UI/AgentIDCardWindow.xaml.cs | 2 +- .../Access/UI/GroupedAccessLevelChecklist.xaml.cs | 6 +++--- .../UI/ManageSolutions/EditSolutionsWindow.xaml.cs | 6 +++--- Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs | 2 +- Content.Client/Cargo/UI/CargoShuttleMenu.xaml.cs | 2 +- .../Cartridges/CrewManifestUiFragment.xaml.cs | 3 +-- Content.Client/Changelog/ChangelogWindow.xaml.cs | 2 +- Content.Client/ContextMenu/UI/ContextMenuUIController.cs | 2 +- Content.Client/ContextMenu/UI/EntityMenuUIController.cs | 2 +- Content.Client/Crayon/UI/CrayonWindow.xaml.cs | 2 +- Content.Client/CrewManifest/CrewManifestUi.xaml.cs | 1 - Content.Client/Gateway/UI/GatewayWindow.xaml.cs | 2 +- .../HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs | 2 +- Content.Client/Humanoid/MarkingPicker.xaml.cs | 2 +- Content.Client/Humanoid/SingleMarkingPicker.xaml.cs | 1 - Content.Client/Lobby/UI/CharacterSetupGui.xaml.cs | 2 +- Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs | 6 +++--- .../Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs | 4 ++-- Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs | 2 +- Content.Client/Mapping/MappingPrototypeList.xaml.cs | 6 +++--- Content.Client/Mapping/MappingState.cs | 2 +- Content.Client/Power/PowerMonitoringWindow.xaml.Widgets.cs | 4 ++-- Content.Client/Salvage/UI/OfferingWindow.xaml.cs | 2 +- Content.Client/Shuttles/UI/DockingScreen.xaml.cs | 4 ++-- Content.Client/Shuttles/UI/EmergencyConsoleWindow.xaml.cs | 2 +- Content.Client/Shuttles/UI/MapScreen.xaml.cs | 2 +- Content.Client/Strip/StrippingMenu.cs | 6 +++--- Content.Client/Thief/ThiefBackpackMenu.xaml.cs | 2 +- Content.Client/UserInterface/Controls/SplitBar.xaml.cs | 4 ++-- Content.Client/UserInterface/StatsWindow.xaml.cs | 2 +- .../Systems/Ghost/Controls/GhostTargetWindow.xaml.cs | 2 +- .../Systems/Ghost/Controls/Roles/GhostRolesWindow.xaml.cs | 2 +- .../UserInterface/Systems/Hands/Controls/HandsContainer.cs | 4 ++-- Content.Client/Verbs/UI/VerbMenuUIController.cs | 4 ++-- 35 files changed, 49 insertions(+), 52 deletions(-) diff --git a/Content.Client/Access/UI/AccessOverriderWindow.xaml.cs b/Content.Client/Access/UI/AccessOverriderWindow.xaml.cs index 8e527d7343..a783dd368f 100644 --- a/Content.Client/Access/UI/AccessOverriderWindow.xaml.cs +++ b/Content.Client/Access/UI/AccessOverriderWindow.xaml.cs @@ -25,7 +25,7 @@ namespace Content.Client.Access.UI public void SetAccessLevels(IPrototypeManager protoManager, List> accessLevels) { _accessButtons.Clear(); - AccessLevelGrid.DisposeAllChildren(); + AccessLevelGrid.RemoveAllChildren(); foreach (var access in accessLevels) { diff --git a/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs b/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs index 320bb88a67..209c58c950 100644 --- a/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs +++ b/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs @@ -41,7 +41,7 @@ namespace Content.Client.Access.UI public void SetAllowedIcons(string currentJobIconId) { - IconGrid.DisposeAllChildren(); + IconGrid.RemoveAllChildren(); var jobIconButtonGroup = new ButtonGroup(); var i = 0; diff --git a/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs b/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs index 41d5a84654..7af78d9e5f 100644 --- a/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs +++ b/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs @@ -99,8 +99,8 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer private bool TryRebuildAccessGroupControls() { - AccessGroupList.DisposeAllChildren(); - AccessLevelChecklist.DisposeAllChildren(); + AccessGroupList.RemoveAllChildren(); + AccessLevelChecklist.RemoveAllChildren(); // No access level prototypes were assigned to any of the access level groups. // Either the turret controller has no assigned access levels or their names were invalid. @@ -165,7 +165,7 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer /// public void RebuildAccessLevelsControls() { - AccessLevelChecklist.DisposeAllChildren(); + AccessLevelChecklist.RemoveAllChildren(); _accessLevelEntries.Clear(); // No access level prototypes were assigned to any of the access level groups diff --git a/Content.Client/Administration/UI/ManageSolutions/EditSolutionsWindow.xaml.cs b/Content.Client/Administration/UI/ManageSolutions/EditSolutionsWindow.xaml.cs index a6b61a4393..89016fdf41 100644 --- a/Content.Client/Administration/UI/ManageSolutions/EditSolutionsWindow.xaml.cs +++ b/Content.Client/Administration/UI/ManageSolutions/EditSolutionsWindow.xaml.cs @@ -67,7 +67,7 @@ namespace Content.Client.Administration.UI.ManageSolutions /// public void UpdateReagents() { - ReagentList.DisposeAllChildren(); + ReagentList.RemoveAllChildren(); if (_selectedSolution == null || _solutions == null) return; @@ -92,7 +92,7 @@ namespace Content.Client.Administration.UI.ManageSolutions /// The selected solution. private void UpdateVolumeBox(Solution solution) { - VolumeBox.DisposeAllChildren(); + VolumeBox.RemoveAllChildren(); var volumeLabel = new Label(); volumeLabel.HorizontalExpand = true; @@ -131,7 +131,7 @@ namespace Content.Client.Administration.UI.ManageSolutions /// The selected solution. private void UpdateThermalBox(Solution solution) { - ThermalBox.DisposeAllChildren(); + ThermalBox.RemoveAllChildren(); var heatCap = solution.GetHeatCapacity(null); var specificHeatLabel = new Label(); specificHeatLabel.HorizontalExpand = true; diff --git a/Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs b/Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs index 03246cfdfe..624ab36125 100644 --- a/Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs +++ b/Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs @@ -206,7 +206,7 @@ namespace Content.Client.Cargo.UI if (!_orderConsoleQuery.TryComp(_owner, out var orderConsole)) return; - Requests.DisposeAllChildren(); + Requests.RemoveAllChildren(); foreach (var order in orders) { diff --git a/Content.Client/Cargo/UI/CargoShuttleMenu.xaml.cs b/Content.Client/Cargo/UI/CargoShuttleMenu.xaml.cs index c1ffed0783..970051432b 100644 --- a/Content.Client/Cargo/UI/CargoShuttleMenu.xaml.cs +++ b/Content.Client/Cargo/UI/CargoShuttleMenu.xaml.cs @@ -30,7 +30,7 @@ namespace Content.Client.Cargo.UI public void SetOrders(SpriteSystem sprites, IPrototypeManager protoManager, List orders) { - Orders.DisposeAllChildren(); + Orders.RemoveAllChildren(); foreach (var order in orders) { diff --git a/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs b/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs index 27ddd51815..4daab3d27c 100644 --- a/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs +++ b/Content.Client/CartridgeLoader/Cartridges/CrewManifestUiFragment.xaml.cs @@ -1,4 +1,4 @@ -using Content.Client.CrewManifest.UI; +using Content.Client.CrewManifest.UI; using Content.Shared.CrewManifest; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.Controls; @@ -21,7 +21,6 @@ public sealed partial class CrewManifestUiFragment : BoxContainer public void UpdateState(string stationName, CrewManifestEntries? entries) { - CrewManifestListing.DisposeAllChildren(); CrewManifestListing.RemoveAllChildren(); StationNameContainer.Visible = entries != null; diff --git a/Content.Client/Changelog/ChangelogWindow.xaml.cs b/Content.Client/Changelog/ChangelogWindow.xaml.cs index d82c34254c..d8f560f151 100644 --- a/Content.Client/Changelog/ChangelogWindow.xaml.cs +++ b/Content.Client/Changelog/ChangelogWindow.xaml.cs @@ -55,7 +55,7 @@ namespace Content.Client.Changelog // Changelog is not kept in memory so load it again. var changelogs = await _changelog.LoadChangelog(); - Tabs.DisposeAllChildren(); + Tabs.RemoveAllChildren(); var i = 0; foreach (var changelog in changelogs) diff --git a/Content.Client/ContextMenu/UI/ContextMenuUIController.cs b/Content.Client/ContextMenu/UI/ContextMenuUIController.cs index 1b83f5ed03..ca173ff1e1 100644 --- a/Content.Client/ContextMenu/UI/ContextMenuUIController.cs +++ b/Content.Client/ContextMenu/UI/ContextMenuUIController.cs @@ -95,7 +95,7 @@ namespace Content.Client.ContextMenu.UI /// public void Close() { - RootMenu.MenuBody.DisposeAllChildren(); + RootMenu.MenuBody.RemoveAllChildren(); CancelOpen?.Cancel(); CancelClose?.Cancel(); OnContextClosed?.Invoke(); diff --git a/Content.Client/ContextMenu/UI/EntityMenuUIController.cs b/Content.Client/ContextMenu/UI/EntityMenuUIController.cs index e0a88300db..1855911ca4 100644 --- a/Content.Client/ContextMenu/UI/EntityMenuUIController.cs +++ b/Content.Client/ContextMenu/UI/EntityMenuUIController.cs @@ -293,7 +293,7 @@ namespace Content.Client.ContextMenu.UI var element = new EntityMenuElement(entity); element.SubMenu = new ContextMenuPopup(_context, element); element.SubMenu.OnPopupOpen += () => _verb.OpenVerbMenu(entity, popup: element.SubMenu); - element.SubMenu.OnPopupHide += element.SubMenu.MenuBody.DisposeAllChildren; + element.SubMenu.OnPopupHide += element.SubMenu.MenuBody.RemoveAllChildren; _context.AddElement(menu, element); Elements.TryAdd(entity, element); } diff --git a/Content.Client/Crayon/UI/CrayonWindow.xaml.cs b/Content.Client/Crayon/UI/CrayonWindow.xaml.cs index 88475562c6..f1ac5a79cb 100644 --- a/Content.Client/Crayon/UI/CrayonWindow.xaml.cs +++ b/Content.Client/Crayon/UI/CrayonWindow.xaml.cs @@ -53,7 +53,7 @@ namespace Content.Client.Crayon.UI private void RefreshList() { // Clear - Grids.DisposeAllChildren(); + Grids.RemoveAllChildren(); if (_decals == null || _allDecals == null) return; diff --git a/Content.Client/CrewManifest/CrewManifestUi.xaml.cs b/Content.Client/CrewManifest/CrewManifestUi.xaml.cs index f07e54eb65..3c13681b97 100644 --- a/Content.Client/CrewManifest/CrewManifestUi.xaml.cs +++ b/Content.Client/CrewManifest/CrewManifestUi.xaml.cs @@ -18,7 +18,6 @@ public sealed partial class CrewManifestUi : DefaultWindow public void Populate(string name, CrewManifestEntries? entries) { - CrewManifestListing.DisposeAllChildren(); CrewManifestListing.RemoveAllChildren(); StationNameContainer.Visible = entries != null; diff --git a/Content.Client/Gateway/UI/GatewayWindow.xaml.cs b/Content.Client/Gateway/UI/GatewayWindow.xaml.cs index 1c779b2b35..9fb7c339d3 100644 --- a/Content.Client/Gateway/UI/GatewayWindow.xaml.cs +++ b/Content.Client/Gateway/UI/GatewayWindow.xaml.cs @@ -72,7 +72,7 @@ public sealed partial class GatewayWindow : FancyWindow, _isUnlockPending = _nextUnlock >= _timing.CurTime; _isCooldownPending = _nextReady >= _timing.CurTime; - Container.DisposeAllChildren(); + Container.RemoveAllChildren(); if (_destinations.Count == 0) { diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs index fd3615d59f..225619b031 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs @@ -116,7 +116,7 @@ namespace Content.Client.HealthAnalyzer.UI AlertsContainer.Visible = showAlerts; if (showAlerts) - AlertsContainer.DisposeAllChildren(); + AlertsContainer.RemoveAllChildren(); if (msg.Unrevivable == true) AlertsContainer.AddChild(new RichTextLabel diff --git a/Content.Client/Humanoid/MarkingPicker.xaml.cs b/Content.Client/Humanoid/MarkingPicker.xaml.cs index 5a571942b8..992a72b930 100644 --- a/Content.Client/Humanoid/MarkingPicker.xaml.cs +++ b/Content.Client/Humanoid/MarkingPicker.xaml.cs @@ -404,7 +404,7 @@ public sealed partial class MarkingPicker : Control var stateNames = GetMarkingStateNames(prototype); _currentMarkingColors.Clear(); - CMarkingColors.DisposeAllChildren(); + CMarkingColors.RemoveAllChildren(); List colorSliders = new(); for (int i = 0; i < prototype.Sprites.Count; i++) { diff --git a/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs b/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs index 822768893e..7ff10d7e13 100644 --- a/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs +++ b/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs @@ -216,7 +216,6 @@ public sealed partial class SingleMarkingPicker : BoxContainer var marking = _markings[Slot]; - ColorSelectorContainer.DisposeAllChildren(); ColorSelectorContainer.RemoveAllChildren(); if (marking.MarkingColors.Count != proto.Sprites.Count) diff --git a/Content.Client/Lobby/UI/CharacterSetupGui.xaml.cs b/Content.Client/Lobby/UI/CharacterSetupGui.xaml.cs index 4579916132..28c5d7844e 100644 --- a/Content.Client/Lobby/UI/CharacterSetupGui.xaml.cs +++ b/Content.Client/Lobby/UI/CharacterSetupGui.xaml.cs @@ -72,7 +72,7 @@ namespace Content.Client.Lobby.UI public void ReloadCharacterPickers() { _createNewCharacterButton.Orphan(); - Characters.DisposeAllChildren(); + Characters.RemoveAllChildren(); var numberOfFullSlots = 0; var characterButtonsGroup = new ButtonGroup(); diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs index 609b633fe4..38bd23e3db 100644 --- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs @@ -491,7 +491,7 @@ namespace Content.Client.Lobby.UI /// public void RefreshTraits() { - TraitsList.DisposeAllChildren(); + TraitsList.RemoveAllChildren(); var traits = _prototypeManager.EnumeratePrototypes().OrderBy(t => Loc.GetString(t.Name)).ToList(); TabContainer.SetTabTitle(3, Loc.GetString("humanoid-profile-editor-traits-tab")); @@ -632,7 +632,7 @@ namespace Content.Client.Lobby.UI public void RefreshAntags() { - AntagList.DisposeAllChildren(); + AntagList.RemoveAllChildren(); var items = new[] { ("humanoid-profile-editor-antag-preference-yes-button", 0), @@ -826,7 +826,7 @@ namespace Content.Client.Lobby.UI /// public void RefreshJobs() { - JobList.DisposeAllChildren(); + JobList.RemoveAllChildren(); _jobCategories.Clear(); _jobPriorities.Clear(); var firstCategory = true; diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs index 644910db60..88fd34cb7e 100644 --- a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs +++ b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs @@ -42,7 +42,7 @@ public sealed partial class LoadoutGroupContainer : BoxContainer { var protoMan = collection.Resolve(); var loadoutSystem = collection.Resolve().System(); - RestrictionsContainer.DisposeAllChildren(); + RestrictionsContainer.RemoveAllChildren(); if (_groupProto.MinLimit > 0) { @@ -71,7 +71,7 @@ public sealed partial class LoadoutGroupContainer : BoxContainer }); } - LoadoutsContainer.DisposeAllChildren(); + LoadoutsContainer.RemoveAllChildren(); // Get all loadout prototypes for this group. var validProtos = _groupProto.Loadouts.Select(id => protoMan.Index(id)); diff --git a/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs b/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs index 619cac6839..9b1e7d50f8 100644 --- a/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs +++ b/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs @@ -43,7 +43,7 @@ public sealed partial class LobbyCharacterPreviewPanel : Control _previewDummy = uid; - ViewBox.DisposeAllChildren(); + ViewBox.RemoveAllChildren(); var spriteView = new SpriteView { OverrideDirection = Direction.South, diff --git a/Content.Client/Mapping/MappingPrototypeList.xaml.cs b/Content.Client/Mapping/MappingPrototypeList.xaml.cs index 8b59e6eb6f..13c92c4516 100644 --- a/Content.Client/Mapping/MappingPrototypeList.xaml.cs +++ b/Content.Client/Mapping/MappingPrototypeList.xaml.cs @@ -1,4 +1,4 @@ -using System.Numerics; +using System.Numerics; using Robust.Client.AutoGenerated; using Robust.Client.Graphics; using Robust.Client.UserInterface; @@ -37,7 +37,7 @@ public sealed partial class MappingPrototypeList : Control { _prototypes.Clear(); - PrototypeList.DisposeAllChildren(); + PrototypeList.RemoveAllChildren(); _prototypes.AddRange(prototypes); @@ -99,7 +99,7 @@ public sealed partial class MappingPrototypeList : Control public void Search(List prototypes) { _search.Clear(); - SearchList.DisposeAllChildren(); + SearchList.RemoveAllChildren(); _lastIndices = (0, -1); _search.AddRange(prototypes); diff --git a/Content.Client/Mapping/MappingState.cs b/Content.Client/Mapping/MappingState.cs index 97fbee70bc..27440607cb 100644 --- a/Content.Client/Mapping/MappingState.cs +++ b/Content.Client/Mapping/MappingState.cs @@ -861,7 +861,7 @@ public sealed class MappingState : GameplayStateBase } else { - button.ChildrenPrototypes.DisposeAllChildren(); + button.ChildrenPrototypes.RemoveAllChildren(); button.CollapseButton.Label.Text = "▶"; } } diff --git a/Content.Client/Power/PowerMonitoringWindow.xaml.Widgets.cs b/Content.Client/Power/PowerMonitoringWindow.xaml.Widgets.cs index e2b27c1b62..209c1cd32b 100644 --- a/Content.Client/Power/PowerMonitoringWindow.xaml.Widgets.cs +++ b/Content.Client/Power/PowerMonitoringWindow.xaml.Widgets.cs @@ -53,8 +53,8 @@ public sealed partial class PowerMonitoringWindow // Selection action windowEntry.Button.OnButtonUp += args => { - windowEntry.SourcesContainer.DisposeAllChildren(); - windowEntry.LoadsContainer.DisposeAllChildren(); + windowEntry.SourcesContainer.RemoveAllChildren(); + windowEntry.LoadsContainer.RemoveAllChildren(); ButtonAction(windowEntry, masterContainer); }; } diff --git a/Content.Client/Salvage/UI/OfferingWindow.xaml.cs b/Content.Client/Salvage/UI/OfferingWindow.xaml.cs index 2b607b8213..3b12a31c77 100644 --- a/Content.Client/Salvage/UI/OfferingWindow.xaml.cs +++ b/Content.Client/Salvage/UI/OfferingWindow.xaml.cs @@ -70,7 +70,7 @@ public sealed partial class OfferingWindow : FancyWindow, public void ClearOptions() { - Container.DisposeAllChildren(); + Container.RemoveAllChildren(); } protected override void FrameUpdate(FrameEventArgs args) diff --git a/Content.Client/Shuttles/UI/DockingScreen.xaml.cs b/Content.Client/Shuttles/UI/DockingScreen.xaml.cs index 97943c6973..97125d3159 100644 --- a/Content.Client/Shuttles/UI/DockingScreen.xaml.cs +++ b/Content.Client/Shuttles/UI/DockingScreen.xaml.cs @@ -67,8 +67,8 @@ public sealed partial class DockingScreen : BoxContainer { DockingControl.BuildDocks(shuttle); var currentDock = DockingControl.ViewedDock; - // DockedWith.DisposeAllChildren(); - DockPorts.DisposeAllChildren(); + // DockedWith.RemoveAllChildren(); + DockPorts.RemoveAllChildren(); _ourDockButtons.Clear(); if (shuttle == null) diff --git a/Content.Client/Shuttles/UI/EmergencyConsoleWindow.xaml.cs b/Content.Client/Shuttles/UI/EmergencyConsoleWindow.xaml.cs index 87103084b4..f9a7f02d7e 100644 --- a/Content.Client/Shuttles/UI/EmergencyConsoleWindow.xaml.cs +++ b/Content.Client/Shuttles/UI/EmergencyConsoleWindow.xaml.cs @@ -59,7 +59,7 @@ public sealed partial class EmergencyConsoleWindow : FancyWindow, // TODO: Loc and cvar for this. _earlyLaunchTime = scc.EarlyLaunchTime; - AuthorizationsContainer.DisposeAllChildren(); + AuthorizationsContainer.RemoveAllChildren(); var remainingAuths = scc.AuthorizationsRequired - scc.Authorizations.Count; AuthorizationCount.Text = Loc.GetString("emergency-shuttle-ui-remaining", ("remaining", remainingAuths)); diff --git a/Content.Client/Shuttles/UI/MapScreen.xaml.cs b/Content.Client/Shuttles/UI/MapScreen.xaml.cs index 0d7df38b91..72ad3c28b1 100644 --- a/Content.Client/Shuttles/UI/MapScreen.xaml.cs +++ b/Content.Client/Shuttles/UI/MapScreen.xaml.cs @@ -237,7 +237,7 @@ public sealed partial class MapScreen : BoxContainer private void ClearMapObjects() { _mapObjectControls.Clear(); - HyperspaceDestinations.DisposeAllChildren(); + HyperspaceDestinations.RemoveAllChildren(); _pendingMapObjects.Clear(); _mapObjects.Clear(); _mapHeadings.Clear(); diff --git a/Content.Client/Strip/StrippingMenu.cs b/Content.Client/Strip/StrippingMenu.cs index 531e5fb44d..124356e011 100644 --- a/Content.Client/Strip/StrippingMenu.cs +++ b/Content.Client/Strip/StrippingMenu.cs @@ -25,9 +25,9 @@ namespace Content.Client.Strip public void ClearButtons() { - InventoryContainer.DisposeAllChildren(); - HandsContainer.DisposeAllChildren(); - SnareContainer.DisposeAllChildren(); + InventoryContainer.RemoveAllChildren(); + HandsContainer.RemoveAllChildren(); + SnareContainer.RemoveAllChildren(); } protected override void FrameUpdate(FrameEventArgs args) diff --git a/Content.Client/Thief/ThiefBackpackMenu.xaml.cs b/Content.Client/Thief/ThiefBackpackMenu.xaml.cs index aaee357617..328ca45b4b 100644 --- a/Content.Client/Thief/ThiefBackpackMenu.xaml.cs +++ b/Content.Client/Thief/ThiefBackpackMenu.xaml.cs @@ -29,7 +29,7 @@ public sealed partial class ThiefBackpackMenu : FancyWindow public void UpdateState(ThiefBackpackBoundUserInterfaceState state) { - SetsGrid.DisposeAllChildren(); + SetsGrid.RemoveAllChildren(); var selectedNumber = 0; foreach (var (set, info) in state.Sets) { diff --git a/Content.Client/UserInterface/Controls/SplitBar.xaml.cs b/Content.Client/UserInterface/Controls/SplitBar.xaml.cs index 2c0b716448..2f69b15499 100644 --- a/Content.Client/UserInterface/Controls/SplitBar.xaml.cs +++ b/Content.Client/UserInterface/Controls/SplitBar.xaml.cs @@ -1,4 +1,4 @@ -using System.Numerics; +using System.Numerics; using Robust.Client.AutoGenerated; using Robust.Client.Graphics; using Robust.Client.UserInterface.Controls; @@ -19,7 +19,7 @@ namespace Content.Client.UserInterface.Controls public void Clear() { - DisposeAllChildren(); + RemoveAllChildren(); } public void AddEntry(float amount, Color color, string? tooltip = null) diff --git a/Content.Client/UserInterface/StatsWindow.xaml.cs b/Content.Client/UserInterface/StatsWindow.xaml.cs index 29c48fff67..5684be9e5b 100644 --- a/Content.Client/UserInterface/StatsWindow.xaml.cs +++ b/Content.Client/UserInterface/StatsWindow.xaml.cs @@ -17,7 +17,7 @@ namespace Content.Client.UserInterface public void UpdateValues(List headers, List values) { - Values.DisposeAllChildren(); + Values.RemoveAllChildren(); Values.Columns = headers.Count; for (var i = 0; i < headers.Count; i++) diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs b/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs index 3ef69578a0..17b4e04d24 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs +++ b/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs @@ -45,7 +45,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls public void Populate() { - ButtonContainer.DisposeAllChildren(); + ButtonContainer.RemoveAllChildren(); AddButtons(); } diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesWindow.xaml.cs b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesWindow.xaml.cs index 9e2ff816b3..dd5e7e6a9b 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesWindow.xaml.cs +++ b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesWindow.xaml.cs @@ -26,7 +26,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles public void ClearEntries() { NoRolesMessage.Visible = true; - EntryContainer.DisposeAllChildren(); + EntryContainer.RemoveAllChildren(); _collapsibleBoxes.Clear(); } diff --git a/Content.Client/UserInterface/Systems/Hands/Controls/HandsContainer.cs b/Content.Client/UserInterface/Systems/Hands/Controls/HandsContainer.cs index 1421e302b8..d2f24abd6c 100644 --- a/Content.Client/UserInterface/Systems/Hands/Controls/HandsContainer.cs +++ b/Content.Client/UserInterface/Systems/Hands/Controls/HandsContainer.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using Content.Client.UserInterface.Systems.Inventory.Controls; using Robust.Client.UserInterface.Controls; @@ -74,7 +74,7 @@ public sealed class HandsContainer : ItemSlotUIContainer public void Clear() { ClearButtons(); - _grid.DisposeAllChildren(); + _grid.RemoveAllChildren(); } public IEnumerable GetButtons() diff --git a/Content.Client/Verbs/UI/VerbMenuUIController.cs b/Content.Client/Verbs/UI/VerbMenuUIController.cs index 32da302904..a45dc90cb7 100644 --- a/Content.Client/Verbs/UI/VerbMenuUIController.cs +++ b/Content.Client/Verbs/UI/VerbMenuUIController.cs @@ -109,7 +109,7 @@ namespace Content.Client.Verbs.UI Close(); var menu = popup ?? _context.RootMenu; - menu.MenuBody.DisposeAllChildren(); + menu.MenuBody.RemoveAllChildren(); CurrentTarget = target; CurrentVerbs = _verbSystem.GetVerbs(target, user, Verb.VerbTypes, out ExtraCategories, force); @@ -207,7 +207,7 @@ namespace Content.Client.Verbs.UI /// public void AddServerVerbs(List? verbs, ContextMenuPopup popup) { - popup.MenuBody.DisposeAllChildren(); + popup.MenuBody.RemoveAllChildren(); // Verbs may be null if the server does not think we can see the target entity. This **should** not happen. if (verbs == null)