diff --git a/Content.Client/AI/ClientAiDebugSystem.cs b/Content.Client/AI/ClientAiDebugSystem.cs index e60014f48f..fb3a657c4b 100644 --- a/Content.Client/AI/ClientAiDebugSystem.cs +++ b/Content.Client/AI/ClientAiDebugSystem.cs @@ -8,6 +8,7 @@ using Robust.Client.UserInterface.Controls; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Maths; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.AI { @@ -169,8 +170,9 @@ namespace Content.Client.AI MouseFilter = Control.MouseFilterMode.Ignore, }; - var vBox = new VBoxContainer() + var vBox = new BoxContainer() { + Orientation = LayoutOrientation.Vertical, SeparationOverride = 15, Children = {actionLabel, pathfindingLabel}, }; diff --git a/Content.Client/AME/UI/AMEWindow.cs b/Content.Client/AME/UI/AMEWindow.cs index 0b56471431..e9104e6f67 100644 --- a/Content.Client/AME/UI/AMEWindow.cs +++ b/Content.Client/AME/UI/AMEWindow.cs @@ -6,6 +6,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; using static Content.Shared.AME.SharedAMEControllerComponent; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.AME.UI { @@ -30,58 +31,66 @@ namespace Content.Client.AME.UI MinSize = SetSize = (250, 250); - Contents.AddChild(new VBoxContainer + Contents.AddChild(new BoxContainer { + Orientation = LayoutOrientation.Vertical, Children = { - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { new Label {Text = Loc.GetString("ame-window-engine-status-label") + " "}, (InjectionStatus = new Label {Text = Loc.GetString("ame-window-engine-injection-status-not-injecting-label")}) } }, - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { (ToggleInjection = new Button {Text = Loc.GetString("ame-window-toggle-injection-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}), } }, - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { new Label {Text = Loc.GetString("ame-window-fuel-status-label") + " "}, (FuelAmount = new Label {Text = Loc.GetString("ame-window-fuel-not-inserted-text")}) } }, - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { (EjectButton = new Button {Text = Loc.GetString("ame-window-eject-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}), } }, - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { new Label {Text = Loc.GetString("ame-window-injection-amount-label") + " "}, (InjectionAmount = new Label {Text = "0"}) } }, - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { (IncreaseFuelButton = new Button {Text = Loc.GetString("ame-window-increase-fuel-button"), StyleClasses = {StyleBase.ButtonOpenRight}}), (DecreaseFuelButton = new Button {Text = Loc.GetString("ame-window-decrease-fuel-button"), StyleClasses = {StyleBase.ButtonOpenLeft}}), } }, - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { new Label { Text = Loc.GetString("ame-window-core-count-label") + " "}, diff --git a/Content.Client/Access/UI/IdCardConsoleWindow.cs b/Content.Client/Access/UI/IdCardConsoleWindow.cs index 450aa0ebdd..4c3093baa2 100644 --- a/Content.Client/Access/UI/IdCardConsoleWindow.cs +++ b/Content.Client/Access/UI/IdCardConsoleWindow.cs @@ -8,6 +8,7 @@ using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Prototypes; using static Content.Shared.Access.SharedIdCardConsoleComponent; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Access.UI { @@ -38,7 +39,10 @@ namespace Content.Client.Access.UI { MinSize = SetSize = (650, 290); _owner = owner; - var vBox = new VBoxContainer(); + var vBox = new BoxContainer + { + Orientation = LayoutOrientation.Vertical + }; vBox.AddChild(new GridContainer { diff --git a/Content.Client/Actions/UI/ActionAlertTooltip.cs b/Content.Client/Actions/UI/ActionAlertTooltip.cs index 8ebb9c8642..b64faa56b1 100644 --- a/Content.Client/Actions/UI/ActionAlertTooltip.cs +++ b/Content.Client/Actions/UI/ActionAlertTooltip.cs @@ -4,6 +4,7 @@ using Robust.Client.UserInterface.Controls; using Robust.Shared.IoC; using Robust.Shared.Timing; using Robust.Shared.Utility; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Actions.UI { @@ -28,8 +29,12 @@ namespace Content.Client.Actions.UI SetOnlyStyleClass(StyleNano.StyleClassTooltipPanel); - VBoxContainer vbox; - AddChild(vbox = new VBoxContainer {RectClipContent = true}); + BoxContainer vbox; + AddChild(vbox = new BoxContainer + { + Orientation = LayoutOrientation.Vertical, + RectClipContent = true + }); var nameLabel = new RichTextLabel { MaxWidth = TooltipTextMaxWidth, diff --git a/Content.Client/Actions/UI/ActionMenu.cs b/Content.Client/Actions/UI/ActionMenu.cs index f935adfd3c..bb7f996ad0 100644 --- a/Content.Client/Actions/UI/ActionMenu.cs +++ b/Content.Client/Actions/UI/ActionMenu.cs @@ -19,6 +19,7 @@ using Robust.Shared.Localization; using Robust.Shared.Log; using Robust.Shared.Timing; using static Robust.Client.UserInterface.Controls.BaseButton; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Actions.UI { @@ -71,12 +72,14 @@ namespace Content.Client.Actions.UI Title = Loc.GetString("ui-actionmenu-title"); MinSize = (300, 300); - Contents.AddChild(new VBoxContainer + Contents.AddChild(new BoxContainer { + Orientation = LayoutOrientation.Vertical, Children = { - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { (_searchBar = new LineEdit diff --git a/Content.Client/Actions/UI/ActionSlot.cs b/Content.Client/Actions/UI/ActionSlot.cs index 29b4b48b82..36702eddd9 100644 --- a/Content.Client/Actions/UI/ActionSlot.cs +++ b/Content.Client/Actions/UI/ActionSlot.cs @@ -16,6 +16,7 @@ using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Timing; using Robust.Shared.Utility; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Actions.UI { @@ -174,8 +175,9 @@ namespace Content.Client.Actions.UI _cooldownGraphic = new CooldownGraphic {Progress = 0, Visible = false}; // padding to the left of the number to shift it right - var paddingBox = new HBoxContainer() + var paddingBox = new BoxContainer { + Orientation = LayoutOrientation.Horizontal, HorizontalExpand = true, VerticalExpand = true, MinSize = (64, 64) @@ -187,8 +189,9 @@ namespace Content.Client.Actions.UI paddingBox.AddChild(_number); // padding to the left of the small icon - var paddingBoxItemIcon = new HBoxContainer() + var paddingBoxItemIcon = new BoxContainer { + Orientation = LayoutOrientation.Horizontal, HorizontalExpand = true, VerticalExpand = true, MinSize = (64, 64) diff --git a/Content.Client/Actions/UI/ActionsUI.cs b/Content.Client/Actions/UI/ActionsUI.cs index 7c9b5ca86b..7544bece52 100644 --- a/Content.Client/Actions/UI/ActionsUI.cs +++ b/Content.Client/Actions/UI/ActionsUI.cs @@ -18,6 +18,7 @@ using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Log; using Robust.Shared.Timing; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Actions.UI { @@ -42,7 +43,7 @@ namespace Content.Client.Actions.UI private readonly Label _loadoutNumber; private readonly Texture _lockTexture; private readonly Texture _unlockTexture; - private readonly HBoxContainer _loadoutContainer; + private readonly BoxContainer _loadoutContainer; private readonly TextureRect _dragShadow; @@ -108,15 +109,17 @@ namespace Content.Client.Actions.UI }; AddChild(panelContainer); - var hotbarContainer = new VBoxContainer + var hotbarContainer = new BoxContainer { + Orientation = LayoutOrientation.Vertical, SeparationOverride = 3, HorizontalAlignment = HAlignment.Left }; panelContainer.AddChild(hotbarContainer); - var settingsContainer = new HBoxContainer + var settingsContainer = new BoxContainer { + Orientation = LayoutOrientation.Horizontal, HorizontalExpand = true }; hotbarContainer.AddChild(settingsContainer); @@ -156,8 +159,9 @@ namespace Content.Client.Actions.UI }; hotbarContainer.AddChild(_slotContainer); - _loadoutContainer = new HBoxContainer + _loadoutContainer = new BoxContainer { + Orientation = LayoutOrientation.Horizontal, HorizontalExpand = true, MouseFilter = MouseFilterMode.Stop }; diff --git a/Content.Client/Administration/UI/AdminAddReagentUI.cs b/Content.Client/Administration/UI/AdminAddReagentUI.cs index 397b899369..425fb16746 100644 --- a/Content.Client/Administration/UI/AdminAddReagentUI.cs +++ b/Content.Client/Administration/UI/AdminAddReagentUI.cs @@ -8,6 +8,7 @@ using Robust.Client.UserInterface.CustomControls; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Prototypes; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Administration.UI { @@ -65,8 +66,9 @@ namespace Content.Client.Administration.UI Title = Loc.GetString("admin-add-reagent-eui-title"); - Contents.AddChild(new VBoxContainer + Contents.AddChild(new BoxContainer { + Orientation = LayoutOrientation.Vertical, Children = { new GridContainer @@ -88,8 +90,9 @@ namespace Content.Client.Administration.UI HorizontalExpand = true, VerticalExpand = true }, - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, Children = { (_errorLabel = new Label diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml index 33d5d6d535..4f64435d42 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml +++ b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml @@ -1,13 +1,13 @@ - - + - + - + diff --git a/Content.Client/Administration/UI/PermissionsEui.cs b/Content.Client/Administration/UI/PermissionsEui.cs index feaa2b751d..8aa8b32a6f 100644 --- a/Content.Client/Administration/UI/PermissionsEui.cs +++ b/Content.Client/Administration/UI/PermissionsEui.cs @@ -14,6 +14,7 @@ using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Utility; using static Content.Shared.Administration.PermissionsEuiMsg; +using static Robust.Client.UserInterface.Controls.BoxContainer; namespace Content.Client.Administration.UI { @@ -316,15 +317,17 @@ namespace Content.Client.Administration.UI }; AdminsList = new GridContainer {Columns = 5, VerticalExpand = true}; - var adminVBox = new VBoxContainer + var adminVBox = new BoxContainer { + Orientation = LayoutOrientation.Vertical, Children = {AdminsList, AddAdminButton}, }; TabContainer.SetTabTitle(adminVBox, Loc.GetString("permissions-eui-menu-admins-tab-title")); AdminRanksList = new GridContainer {Columns = 3}; - var rankVBox = new VBoxContainer + var rankVBox = new BoxContainer { + Orientation = LayoutOrientation.Vertical, Children = { AdminRanksList, AddAdminRankButton} }; TabContainer.SetTabTitle(rankVBox, Loc.GetString("permissions-eui-menu-admin-ranks-tab-title")); @@ -451,7 +454,10 @@ namespace Content.Client.Administration.UI FlagButtons.Add(flag, (inherit, sub, plus)); } - var bottomButtons = new HBoxContainer(); + var bottomButtons = new BoxContainer + { + Orientation = LayoutOrientation.Horizontal + }; if (data != null) { // show remove button. @@ -461,17 +467,20 @@ namespace Content.Client.Administration.UI bottomButtons.AddChild(SaveButton); - Contents.AddChild(new VBoxContainer + Contents.AddChild(new BoxContainer { + Orientation = LayoutOrientation.Vertical, Children = { - new HBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Horizontal, SeparationOverride = 2, Children = { - new VBoxContainer + new BoxContainer { + Orientation = LayoutOrientation.Vertical, HorizontalExpand = true, Children = { @@ -541,7 +550,10 @@ namespace Content.Client.Administration.UI HorizontalAlignment = HAlignment.Right, HorizontalExpand = true }; - var flagsBox = new VBoxContainer(); + var flagsBox = new BoxContainer + { + Orientation = LayoutOrientation.Vertical + }; foreach (var flag in AdminFlagsHelper.AllFlags) { @@ -565,7 +577,10 @@ namespace Content.Client.Administration.UI flagsBox.AddChild(checkBox); } - var bottomButtons = new HBoxContainer(); + var bottomButtons = new BoxContainer + { + Orientation = LayoutOrientation.Horizontal + }; if (data != null) { // show remove button. @@ -575,8 +590,9 @@ namespace Content.Client.Administration.UI bottomButtons.AddChild(SaveButton); - Contents.AddChild(new VBoxContainer + Contents.AddChild(new BoxContainer { + Orientation = LayoutOrientation.Vertical, Children = { NameEdit, diff --git a/Content.Client/Administration/UI/SetOutfit/SetOutfitMenu.xaml b/Content.Client/Administration/UI/SetOutfit/SetOutfitMenu.xaml index 6cdafeb1c8..efb831cd1b 100644 --- a/Content.Client/Administration/UI/SetOutfit/SetOutfitMenu.xaml +++ b/Content.Client/Administration/UI/SetOutfit/SetOutfitMenu.xaml @@ -1,15 +1,15 @@ - - - + + - +