Replace most VBox/HBoxContainers with BoxContainers (#4274)

This commit is contained in:
Visne
2021-07-18 18:39:31 +02:00
committed by GitHub
parent 0d1af2c5ff
commit bf493c39b7
101 changed files with 1143 additions and 567 deletions

View File

@@ -8,6 +8,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.AI namespace Content.Client.AI
{ {
@@ -169,8 +170,9 @@ namespace Content.Client.AI
MouseFilter = Control.MouseFilterMode.Ignore, MouseFilter = Control.MouseFilterMode.Ignore,
}; };
var vBox = new VBoxContainer() var vBox = new BoxContainer()
{ {
Orientation = LayoutOrientation.Vertical,
SeparationOverride = 15, SeparationOverride = 15,
Children = {actionLabel, pathfindingLabel}, Children = {actionLabel, pathfindingLabel},
}; };

View File

@@ -6,6 +6,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Content.Shared.AME.SharedAMEControllerComponent; using static Content.Shared.AME.SharedAMEControllerComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.AME.UI namespace Content.Client.AME.UI
{ {
@@ -30,58 +31,66 @@ namespace Content.Client.AME.UI
MinSize = SetSize = (250, 250); MinSize = SetSize = (250, 250);
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("ame-window-engine-status-label") + " "}, new Label {Text = Loc.GetString("ame-window-engine-status-label") + " "},
(InjectionStatus = new Label {Text = Loc.GetString("ame-window-engine-injection-status-not-injecting-label")}) (InjectionStatus = new Label {Text = Loc.GetString("ame-window-engine-injection-status-not-injecting-label")})
} }
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(ToggleInjection = new Button {Text = Loc.GetString("ame-window-toggle-injection-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}), (ToggleInjection = new Button {Text = Loc.GetString("ame-window-toggle-injection-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
} }
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("ame-window-fuel-status-label") + " "}, new Label {Text = Loc.GetString("ame-window-fuel-status-label") + " "},
(FuelAmount = new Label {Text = Loc.GetString("ame-window-fuel-not-inserted-text")}) (FuelAmount = new Label {Text = Loc.GetString("ame-window-fuel-not-inserted-text")})
} }
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(EjectButton = new Button {Text = Loc.GetString("ame-window-eject-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}), (EjectButton = new Button {Text = Loc.GetString("ame-window-eject-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
} }
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("ame-window-injection-amount-label") + " "}, new Label {Text = Loc.GetString("ame-window-injection-amount-label") + " "},
(InjectionAmount = new Label {Text = "0"}) (InjectionAmount = new Label {Text = "0"})
} }
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(IncreaseFuelButton = new Button {Text = Loc.GetString("ame-window-increase-fuel-button"), StyleClasses = {StyleBase.ButtonOpenRight}}), (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}}), (DecreaseFuelButton = new Button {Text = Loc.GetString("ame-window-decrease-fuel-button"), StyleClasses = {StyleBase.ButtonOpenLeft}}),
} }
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label { Text = Loc.GetString("ame-window-core-count-label") + " "}, new Label { Text = Loc.GetString("ame-window-core-count-label") + " "},

View File

@@ -8,6 +8,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Content.Shared.Access.SharedIdCardConsoleComponent; using static Content.Shared.Access.SharedIdCardConsoleComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Access.UI namespace Content.Client.Access.UI
{ {
@@ -38,7 +39,10 @@ namespace Content.Client.Access.UI
{ {
MinSize = SetSize = (650, 290); MinSize = SetSize = (650, 290);
_owner = owner; _owner = owner;
var vBox = new VBoxContainer(); var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
vBox.AddChild(new GridContainer vBox.AddChild(new GridContainer
{ {

View File

@@ -4,6 +4,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Actions.UI namespace Content.Client.Actions.UI
{ {
@@ -28,8 +29,12 @@ namespace Content.Client.Actions.UI
SetOnlyStyleClass(StyleNano.StyleClassTooltipPanel); SetOnlyStyleClass(StyleNano.StyleClassTooltipPanel);
VBoxContainer vbox; BoxContainer vbox;
AddChild(vbox = new VBoxContainer {RectClipContent = true}); AddChild(vbox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
RectClipContent = true
});
var nameLabel = new RichTextLabel var nameLabel = new RichTextLabel
{ {
MaxWidth = TooltipTextMaxWidth, MaxWidth = TooltipTextMaxWidth,

View File

@@ -19,6 +19,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using static Robust.Client.UserInterface.Controls.BaseButton; using static Robust.Client.UserInterface.Controls.BaseButton;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Actions.UI namespace Content.Client.Actions.UI
{ {
@@ -71,12 +72,14 @@ namespace Content.Client.Actions.UI
Title = Loc.GetString("ui-actionmenu-title"); Title = Loc.GetString("ui-actionmenu-title");
MinSize = (300, 300); MinSize = (300, 300);
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(_searchBar = new LineEdit (_searchBar = new LineEdit

View File

@@ -16,6 +16,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Actions.UI namespace Content.Client.Actions.UI
{ {
@@ -174,8 +175,9 @@ namespace Content.Client.Actions.UI
_cooldownGraphic = new CooldownGraphic {Progress = 0, Visible = false}; _cooldownGraphic = new CooldownGraphic {Progress = 0, Visible = false};
// padding to the left of the number to shift it right // padding to the left of the number to shift it right
var paddingBox = new HBoxContainer() var paddingBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
MinSize = (64, 64) MinSize = (64, 64)
@@ -187,8 +189,9 @@ namespace Content.Client.Actions.UI
paddingBox.AddChild(_number); paddingBox.AddChild(_number);
// padding to the left of the small icon // padding to the left of the small icon
var paddingBoxItemIcon = new HBoxContainer() var paddingBoxItemIcon = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
MinSize = (64, 64) MinSize = (64, 64)

View File

@@ -18,6 +18,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Actions.UI namespace Content.Client.Actions.UI
{ {
@@ -42,7 +43,7 @@ namespace Content.Client.Actions.UI
private readonly Label _loadoutNumber; private readonly Label _loadoutNumber;
private readonly Texture _lockTexture; private readonly Texture _lockTexture;
private readonly Texture _unlockTexture; private readonly Texture _unlockTexture;
private readonly HBoxContainer _loadoutContainer; private readonly BoxContainer _loadoutContainer;
private readonly TextureRect _dragShadow; private readonly TextureRect _dragShadow;
@@ -108,15 +109,17 @@ namespace Content.Client.Actions.UI
}; };
AddChild(panelContainer); AddChild(panelContainer);
var hotbarContainer = new VBoxContainer var hotbarContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
SeparationOverride = 3, SeparationOverride = 3,
HorizontalAlignment = HAlignment.Left HorizontalAlignment = HAlignment.Left
}; };
panelContainer.AddChild(hotbarContainer); panelContainer.AddChild(hotbarContainer);
var settingsContainer = new HBoxContainer var settingsContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true HorizontalExpand = true
}; };
hotbarContainer.AddChild(settingsContainer); hotbarContainer.AddChild(settingsContainer);
@@ -156,8 +159,9 @@ namespace Content.Client.Actions.UI
}; };
hotbarContainer.AddChild(_slotContainer); hotbarContainer.AddChild(_slotContainer);
_loadoutContainer = new HBoxContainer _loadoutContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
MouseFilter = MouseFilterMode.Stop MouseFilter = MouseFilterMode.Stop
}; };

View File

@@ -8,6 +8,7 @@ using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Administration.UI namespace Content.Client.Administration.UI
{ {
@@ -65,8 +66,9 @@ namespace Content.Client.Administration.UI
Title = Loc.GetString("admin-add-reagent-eui-title"); Title = Loc.GetString("admin-add-reagent-eui-title");
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new GridContainer new GridContainer
@@ -88,8 +90,9 @@ namespace Content.Client.Administration.UI
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true VerticalExpand = true
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(_errorLabel = new Label (_errorLabel = new Label

View File

@@ -1,13 +1,13 @@
<VBoxContainer <BoxContainer Orientation="Vertical"
xmlns="https://spacestation14.io"> xmlns="https://spacestation14.io">
<Control CustomMinimumSize="0 5" /> <Control CustomMinimumSize="0 5" />
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<!-- <Label Text="{Loc Search}" CustomMinimumSize="100 0" /> --> <!-- <Label Text="{Loc Search}" CustomMinimumSize="100 0" /> -->
<!-- <Control CustomMinimumSize="50 0" /> --> <!-- <Control CustomMinimumSize="50 0" /> -->
<LineEdit Name="FilterLineEdit" CustomMinimumSize="100 0" SizeFlagsHorizontal="FillExpand" PlaceHolder="{Loc Filter}"/> <LineEdit Name="FilterLineEdit" CustomMinimumSize="100 0" SizeFlagsHorizontal="FillExpand" PlaceHolder="{Loc Filter}"/>
</HBoxContainer> </BoxContainer>
<!-- <Control CustomMinimumSize="0 5" /> --> <!-- <Control CustomMinimumSize="0 5" /> -->
<ItemList <ItemList
Name="PlayerItemList" SelectMode="Single" SizeFlagsVertical="FillExpand" SizeFlagsHorizontal="FillExpand" Name="PlayerItemList" SelectMode="Single" SizeFlagsVertical="FillExpand" SizeFlagsHorizontal="FillExpand"
CustomMinimumSize="100 100" /> CustomMinimumSize="100 100" />
</VBoxContainer> </BoxContainer>

View File

@@ -14,6 +14,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Content.Shared.Administration.PermissionsEuiMsg; using static Content.Shared.Administration.PermissionsEuiMsg;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Administration.UI namespace Content.Client.Administration.UI
{ {
@@ -316,15 +317,17 @@ namespace Content.Client.Administration.UI
}; };
AdminsList = new GridContainer {Columns = 5, VerticalExpand = true}; AdminsList = new GridContainer {Columns = 5, VerticalExpand = true};
var adminVBox = new VBoxContainer var adminVBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = {AdminsList, AddAdminButton}, Children = {AdminsList, AddAdminButton},
}; };
TabContainer.SetTabTitle(adminVBox, Loc.GetString("permissions-eui-menu-admins-tab-title")); TabContainer.SetTabTitle(adminVBox, Loc.GetString("permissions-eui-menu-admins-tab-title"));
AdminRanksList = new GridContainer {Columns = 3}; AdminRanksList = new GridContainer {Columns = 3};
var rankVBox = new VBoxContainer var rankVBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = { AdminRanksList, AddAdminRankButton} Children = { AdminRanksList, AddAdminRankButton}
}; };
TabContainer.SetTabTitle(rankVBox, Loc.GetString("permissions-eui-menu-admin-ranks-tab-title")); 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)); FlagButtons.Add(flag, (inherit, sub, plus));
} }
var bottomButtons = new HBoxContainer(); var bottomButtons = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
if (data != null) if (data != null)
{ {
// show remove button. // show remove button.
@@ -461,17 +467,20 @@ namespace Content.Client.Administration.UI
bottomButtons.AddChild(SaveButton); bottomButtons.AddChild(SaveButton);
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 2, SeparationOverride = 2,
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -541,7 +550,10 @@ namespace Content.Client.Administration.UI
HorizontalAlignment = HAlignment.Right, HorizontalAlignment = HAlignment.Right,
HorizontalExpand = true HorizontalExpand = true
}; };
var flagsBox = new VBoxContainer(); var flagsBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
foreach (var flag in AdminFlagsHelper.AllFlags) foreach (var flag in AdminFlagsHelper.AllFlags)
{ {
@@ -565,7 +577,10 @@ namespace Content.Client.Administration.UI
flagsBox.AddChild(checkBox); flagsBox.AddChild(checkBox);
} }
var bottomButtons = new HBoxContainer(); var bottomButtons = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
if (data != null) if (data != null)
{ {
// show remove button. // show remove button.
@@ -575,8 +590,9 @@ namespace Content.Client.Administration.UI
bottomButtons.AddChild(SaveButton); bottomButtons.AddChild(SaveButton);
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
NameEdit, NameEdit,

View File

@@ -1,15 +1,15 @@
<SS14Window <SS14Window
xmlns="https://spacestation14.io"> xmlns="https://spacestation14.io">
<HBoxContainer HorizontalExpand="True"> <BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<VBoxContainer HorizontalExpand="True" SizeFlagsStretchRatio="0.45"> <BoxContainer Orientation="Vertical" HorizontalExpand="True" SizeFlagsStretchRatio="0.45">
<HBoxContainer HorizontalExpand="True" VerticalExpand="True" <BoxContainer Orientation="Horizontal" HorizontalExpand="True" VerticalExpand="True"
SizeFlagsStretchRatio="0.1"> SizeFlagsStretchRatio="0.1">
<LineEdit Name="SearchBar" PlaceHolder="Search" HorizontalExpand="True" <LineEdit Name="SearchBar" PlaceHolder="Search" HorizontalExpand="True"
SizeFlagsStretchRatio="0.6" /> SizeFlagsStretchRatio="0.6" />
</HBoxContainer> </BoxContainer>
<ItemList Name="OutfitList" SelectMode="Single" VerticalExpand="True" <ItemList Name="OutfitList" SelectMode="Single" VerticalExpand="True"
SizeFlagsStretchRatio="0.9" /> SizeFlagsStretchRatio="0.9" />
<Button Name="ConfirmButton" HorizontalExpand="True" /> <Button Name="ConfirmButton" HorizontalExpand="True" />
</VBoxContainer> </BoxContainer>
</HBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -5,7 +5,7 @@
xmlns:at="clr-namespace:Content.Client.Administration.UI.Tabs.AdminTab" xmlns:at="clr-namespace:Content.Client.Administration.UI.Tabs.AdminTab"
Margin="4" Margin="4"
MinSize="50 50"> MinSize="50 50">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<GridContainer Columns="4"> <GridContainer Columns="4">
<cc:UICommandButton Command="kick" Text="{Loc Kick}" WindowType="{x:Type at:KickWindow}" /> <cc:UICommandButton Command="kick" Text="{Loc Kick}" WindowType="{x:Type at:KickWindow}" />
<cc:UICommandButton Command="ban" Text="{Loc Ban}" WindowType="{x:Type at:BanWindow}" /> <cc:UICommandButton Command="ban" Text="{Loc Ban}" WindowType="{x:Type at:BanWindow}" />
@@ -13,5 +13,5 @@
<cc:UICommandButton Command="tpto" Text="{Loc Teleport}" WindowType="{x:Type at:TeleportWindow}" /> <cc:UICommandButton Command="tpto" Text="{Loc Teleport}" WindowType="{x:Type at:TeleportWindow}" />
<cc:CommandButton Command="permissions" Text="{Loc Permissions Panel}" /> <cc:CommandButton Command="permissions" Text="{Loc Permissions Panel}" />
</GridContainer> </GridContainer>
</VBoxContainer> </BoxContainer>
</Control> </Control>

View File

@@ -1,23 +1,23 @@
<SS14Window <SS14Window
xmlns="https://spacestation14.io" xmlns="https://spacestation14.io"
Title="{Loc Ban}" MinSize="425 162"> Title="{Loc Ban}" MinSize="425 162">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Player}" MinWidth="100" /> <Label Text="{Loc Player}" MinWidth="100" />
<Control MinWidth="50" /> <Control MinWidth="50" />
<LineEdit Name="PlayerNameLine" MinWidth="100" HorizontalExpand="True" /> <LineEdit Name="PlayerNameLine" MinWidth="100" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Reason}" MinSize="100 0" /> <Label Text="{Loc Reason}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<LineEdit Name="ReasonLine" MinSize="100 0" HorizontalExpand="True" /> <LineEdit Name="ReasonLine" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Minutes}" MinWidth="100" /> <Label Text="{Loc Minutes}" MinWidth="100" />
<Control MinWidth="50" /> <Control MinWidth="50" />
<LineEdit Name="MinutesLine" MinWidth="100" HorizontalExpand="True" PlaceHolder="{Loc 0 minutes for a permanent ban}" /> <LineEdit Name="MinutesLine" MinWidth="100" HorizontalExpand="True" PlaceHolder="{Loc 0 minutes for a permanent ban}" />
</HBoxContainer> </BoxContainer>
<Control MinWidth="50" /> <Control MinWidth="50" />
<Button Name="SubmitButton" Text="{Loc Ban}" /> <Button Name="SubmitButton" Text="{Loc Ban}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -2,13 +2,13 @@
xmlns="https://spacestation14.io" xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls" xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
Title="{Loc Kick}" MinSize="425 272"> Title="{Loc Kick}" MinSize="425 272">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Reason}" MinWidth="100" /> <Label Text="{Loc Reason}" MinWidth="100" />
<Control MinWidth="50" /> <Control MinWidth="50" />
<LineEdit Name="ReasonLine" MinWidth="100" HorizontalExpand="True" /> <LineEdit Name="ReasonLine" MinWidth="100" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<cc:PlayerListControl Name="PlayerList" /> <cc:PlayerListControl Name="PlayerList" />
<Button Name="SubmitButton" Text="{Loc Kick}" /> <Button Name="SubmitButton" Text="{Loc Kick}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -2,8 +2,8 @@
xmlns="https://spacestation14.io" xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls" xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
Title="{Loc Teleport}" MinSize="425 230"> Title="{Loc Teleport}" MinSize="425 230">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<cc:PlayerListControl Name="PlayerList" /> <cc:PlayerListControl Name="PlayerList" />
<Button Name="SubmitButton" Text="{Loc Teleport}" /> <Button Name="SubmitButton" Text="{Loc Teleport}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -1,13 +1,13 @@
<SS14Window <SS14Window
xmlns="https://spacestation14.io" Title="Kick"> xmlns="https://spacestation14.io" Title="Kick">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Event}" MinSize="100 0" /> <Label Text="{Loc Event}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<OptionButton Name="EventsOptions" MinSize="100 0" HorizontalExpand="True" /> <OptionButton Name="EventsOptions" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<Button Name="PauseButton" Text="{Loc Pause}" /> <Button Name="PauseButton" Text="{Loc Pause}" />
<Button Name="ResumeButton" Text="{Loc Resume}" /> <Button Name="ResumeButton" Text="{Loc Resume}" />
<Button Name="SubmitButton" Text="{Loc Run}" /> <Button Name="SubmitButton" Text="{Loc Run}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -1,11 +1,11 @@
<SS14Window <SS14Window
xmlns="https://spacestation14.io" Title="{Loc Add Atmos}"> xmlns="https://spacestation14.io" Title="{Loc Add Atmos}">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Grid}" MinSize="100 0" /> <Label Text="{Loc Grid}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<OptionButton Name="GridOptions" MinSize="100 0" HorizontalExpand="True" /> <OptionButton Name="GridOptions" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<Button Name="SubmitButton" Text="{Loc Add Atmos}" /> <Button Name="SubmitButton" Text="{Loc Add Atmos}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -1,31 +1,31 @@
<SS14Window <SS14Window
xmlns="https://spacestation14.io" Title="{Loc Add Gas}"> xmlns="https://spacestation14.io" Title="{Loc Add Gas}">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Grid}" MinSize="100 0" /> <Label Text="{Loc Grid}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<OptionButton Name="GridOptions" MinSize="100 0" HorizontalExpand="True" /> <OptionButton Name="GridOptions" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc TileX}" MinSize="100 0" /> <Label Text="{Loc TileX}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<SpinBox Name="TileXSpin" MinSize="100 0" HorizontalExpand="True" /> <SpinBox Name="TileXSpin" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc TileY}" MinSize="100 0" /> <Label Text="{Loc TileY}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<SpinBox Name="TileYSpin" MinSize="100 0" HorizontalExpand="True" /> <SpinBox Name="TileYSpin" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Gas}" MinSize="100 0" /> <Label Text="{Loc Gas}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<OptionButton Name="GasOptions" MinSize="100 0" HorizontalExpand="True" /> <OptionButton Name="GasOptions" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Amount}" MinSize="100 0" /> <Label Text="{Loc Amount}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<SpinBox Name="AmountSpin" MinSize="100 0" HorizontalExpand="True" /> <SpinBox Name="AmountSpin" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<Button Name="SubmitButton" Text="{Loc Add Gas}" /> <Button Name="SubmitButton" Text="{Loc Add Gas}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -1,21 +1,21 @@
<SS14Window <SS14Window
xmlns="https://spacestation14.io" Title="{Loc Fill Gas}"> xmlns="https://spacestation14.io" Title="{Loc Fill Gas}">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Grid}" MinSize="100 0" /> <Label Text="{Loc Grid}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<OptionButton Name="GridOptions" MinSize="100 0" HorizontalExpand="True" /> <OptionButton Name="GridOptions" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Gas}" MinSize="100 0" /> <Label Text="{Loc Gas}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<OptionButton Name="GasOptions" MinSize="100 0" HorizontalExpand="True" /> <OptionButton Name="GasOptions" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Amount}" MinSize="100 0" /> <Label Text="{Loc Amount}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<SpinBox Name="AmountSpin" MinSize="100 0" HorizontalExpand="True" /> <SpinBox Name="AmountSpin" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<Button Name="SubmitButton" Text="{Loc Fill Gas}" /> <Button Name="SubmitButton" Text="{Loc Fill Gas}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -1,26 +1,26 @@
<SS14Window <SS14Window
xmlns="https://spacestation14.io" Title="{Loc Set Temperature}"> xmlns="https://spacestation14.io" Title="{Loc Set Temperature}">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Grid}" MinSize="100 0" /> <Label Text="{Loc Grid}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<OptionButton Name="GridOptions" MinSize="100 0" HorizontalExpand="True" /> <OptionButton Name="GridOptions" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc TileX}" MinSize="100 0" /> <Label Text="{Loc TileX}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<SpinBox Name="TileXSpin" MinSize="100 0" HorizontalExpand="True" /> <SpinBox Name="TileXSpin" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc TileY}" MinSize="100 0" /> <Label Text="{Loc TileY}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<SpinBox Name="TileYSpin" MinSize="100 0" HorizontalExpand="True" /> <SpinBox Name="TileYSpin" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc Temperature}" MinSize="100 0" /> <Label Text="{Loc Temperature}" MinSize="100 0" />
<Control MinSize="50 0" /> <Control MinSize="50 0" />
<SpinBox Name="TemperatureSpin" MinSize="100 0" HorizontalExpand="True" /> <SpinBox Name="TemperatureSpin" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<Button Name="SubmitButton" Text="{Loc Set Temperature}" /> <Button Name="SubmitButton" Text="{Loc Set Temperature}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -1,14 +1,14 @@
<Control xmlns="https://spacestation14.io"> <Control xmlns="https://spacestation14.io">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Name="PlayerCount" HorizontalExpand="True" SizeFlagsStretchRatio="0.7" <Label Name="PlayerCount" HorizontalExpand="True" SizeFlagsStretchRatio="0.7"
Text="{Loc Player Count}" /> Text="{Loc Player Count}" />
<Button Name="RefreshButton" HorizontalExpand="True" SizeFlagsStretchRatio="0.3" <Button Name="RefreshButton" HorizontalExpand="True" SizeFlagsStretchRatio="0.3"
Text="{Loc Refresh}" /> Text="{Loc Refresh}" />
</HBoxContainer> </BoxContainer>
<Control MinSize="0 5" /> <Control MinSize="0 5" />
<ScrollContainer HorizontalExpand="True" VerticalExpand="True"> <ScrollContainer HorizontalExpand="True" VerticalExpand="True">
<VBoxContainer Name="PlayerList" /> <BoxContainer Orientation="Vertical" Name="PlayerList" />
</ScrollContainer> </ScrollContainer>
</VBoxContainer> </BoxContainer>
</Control> </Control>

View File

@@ -9,6 +9,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML; using Robust.Client.UserInterface.XAML;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Administration.UI.Tabs namespace Content.Client.Administration.UI.Tabs
{ {
@@ -40,8 +41,9 @@ namespace Content.Client.Administration.UI.Tabs
var altColor = Color.FromHex("#292B38"); var altColor = Color.FromHex("#292B38");
var defaultColor = Color.FromHex("#2F2F3B"); var defaultColor = Color.FromHex("#2F2F3B");
var header = new HBoxContainer var header = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
SeparationOverride = 4, SeparationOverride = 4,
Children = Children =
@@ -84,8 +86,9 @@ namespace Content.Client.Administration.UI.Tabs
var useAltColor = false; var useAltColor = false;
foreach (var player in players) foreach (var player in players)
{ {
var hBox = new HBoxContainer var hBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
SeparationOverride = 4, SeparationOverride = 4,
Children = Children =

View File

@@ -14,6 +14,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Arcade namespace Content.Client.Arcade
{ {
@@ -28,7 +29,7 @@ namespace Content.Client.Arcade
private readonly PanelContainer _mainPanel; private readonly PanelContainer _mainPanel;
private VBoxContainer _gameRootContainer; private BoxContainer _gameRootContainer;
private GridContainer _gameGrid = default!; private GridContainer _gameGrid = default!;
private GridContainer _nextBlockGrid = default!; private GridContainer _nextBlockGrid = default!;
private GridContainer _holdBlockGrid = default!; private GridContainer _holdBlockGrid = default!;
@@ -68,7 +69,10 @@ namespace Content.Client.Arcade
#region Game Menu #region Game Menu
// building the game container // building the game container
_gameRootContainer = new VBoxContainer(); _gameRootContainer = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
_levelLabel = new Label _levelLabel = new Label
{ {
@@ -92,7 +96,10 @@ namespace Content.Client.Arcade
MinSize = new Vector2(1,10) MinSize = new Vector2(1,10)
}); });
var gameBox = new HBoxContainer(); var gameBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
gameBox.AddChild(SetupHoldBox(backgroundTexture)); gameBox.AddChild(SetupHoldBox(backgroundTexture));
gameBox.AddChild(new Control gameBox.AddChild(new Control
{ {
@@ -152,8 +159,9 @@ namespace Content.Client.Arcade
_menuRootContainer.AddChild(pauseMenuInnerPanel); _menuRootContainer.AddChild(pauseMenuInnerPanel);
var pauseMenuContainer = new VBoxContainer var pauseMenuContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalAlignment = HAlignment.Center, HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center VerticalAlignment = VAlignment.Center
}; };
@@ -224,8 +232,9 @@ namespace Content.Client.Arcade
_gameOverRootContainer.AddChild(gameOverMenuInnerPanel); _gameOverRootContainer.AddChild(gameOverMenuInnerPanel);
var gameOverMenuContainer = new VBoxContainer var gameOverMenuContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalAlignment = HAlignment.Center, HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center VerticalAlignment = VAlignment.Center
}; };
@@ -282,8 +291,9 @@ namespace Content.Client.Arcade
_highscoresRootContainer.AddChild(menuInnerPanel); _highscoresRootContainer.AddChild(menuInnerPanel);
var menuContainer = new VBoxContainer() var menuContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalAlignment = HAlignment.Center, HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center VerticalAlignment = VAlignment.Center
}; };
@@ -291,7 +301,10 @@ namespace Content.Client.Arcade
menuContainer.AddChild(new Label{Text = Loc.GetString("blockgame-menu-label-highscores")}); menuContainer.AddChild(new Label{Text = Loc.GetString("blockgame-menu-label-highscores")});
menuContainer.AddChild(new Control{MinSize = new Vector2(1,10)}); menuContainer.AddChild(new Control{MinSize = new Vector2(1,10)});
var highScoreBox = new HBoxContainer(); var highScoreBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
_localHighscoresLabel = new Label _localHighscoresLabel = new Label
{ {

View File

@@ -10,6 +10,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Content.Shared.Atmos.Components.SharedGasAnalyzerComponent; using static Content.Shared.Atmos.Components.SharedGasAnalyzerComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Atmos.UI namespace Content.Client.Atmos.UI
{ {
@@ -61,11 +62,15 @@ namespace Content.Client.Atmos.UI
LayoutContainer.SetAnchorPreset(bottomWrap, LayoutContainer.LayoutPreset.VerticalCenterWide); LayoutContainer.SetAnchorPreset(bottomWrap, LayoutContainer.LayoutPreset.VerticalCenterWide);
LayoutContainer.SetGrowHorizontal(bottomWrap, LayoutContainer.GrowDirection.Both); LayoutContainer.SetGrowHorizontal(bottomWrap, LayoutContainer.GrowDirection.Both);
var topContainerWrap = new VBoxContainer var topContainerWrap = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(_topContainer = new VBoxContainer()), (_topContainer = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
}),
new Control {MinSize = (0, 110)} new Control {MinSize = (0, 110)}
} }
}; };
@@ -78,8 +83,9 @@ namespace Content.Client.Atmos.UI
var fontSmall = resourceCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 10); var fontSmall = resourceCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 10);
Button refreshButton; Button refreshButton;
var topRow = new HBoxContainer var topRow = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Margin = new Thickness(4, 4, 12, 2), Margin = new Thickness(4, 4, 12, 2),
Children = Children =
{ {
@@ -118,8 +124,9 @@ namespace Content.Client.Atmos.UI
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.FromHex("#202025") }, PanelOverride = new StyleBoxFlat { BackgroundColor = Color.FromHex("#202025") },
Children = Children =
{ {
(_statusContainer = new VBoxContainer (_statusContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(8, 8, 4, 4) Margin = new Thickness(8, 8, 4, 4)
}) })
} }
@@ -178,10 +185,17 @@ namespace Content.Client.Atmos.UI
}); });
// Add a table with all the gases // Add a table with all the gases
var tableKey = new VBoxContainer(); var tableKey = new BoxContainer
var tableVal = new VBoxContainer();
_statusContainer.AddChild(new HBoxContainer
{ {
Orientation = LayoutOrientation.Vertical
};
var tableVal = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
_statusContainer.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
tableKey, tableKey,
@@ -195,8 +209,9 @@ namespace Content.Client.Atmos.UI
// This is the gas bar thingy // This is the gas bar thingy
var height = 30; var height = 30;
var minSize = 24; // This basically allows gases which are too small, to be shown properly var minSize = 24; // This basically allows gases which are too small, to be shown properly
var gasBar = new HBoxContainer var gasBar = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
MinSize = new Vector2(0, height) MinSize = new Vector2(0, height)
}; };

View File

@@ -2,51 +2,51 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:Content.Client.Stylesheets" xmlns:s="clr-namespace:Content.Client.Stylesheets"
MinSize="480 400" Title="Canister"> MinSize="480 400" Title="Canister">
<VBoxContainer Margin="5 5 5 5" SeparationOverride="10"> <BoxContainer Orientation="Vertical" Margin="5 5 5 5" SeparationOverride="10">
<VBoxContainer VerticalExpand="True"> <BoxContainer Orientation="Vertical" VerticalExpand="True">
<Label Text="{Loc comp-gas-canister-ui-canister-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/> <Label Text="{Loc comp-gas-canister-ui-canister-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc comp-gas-canister-ui-canister-pressure}"/> <Label Text="{Loc comp-gas-canister-ui-canister-pressure}"/>
<Label Name="CanisterPressureLabel" Align="Center" HorizontalExpand="True"/> <Label Name="CanisterPressureLabel" Align="Center" HorizontalExpand="True"/>
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc comp-gas-canister-ui-port-status}"/> <Label Text="{Loc comp-gas-canister-ui-port-status}"/>
<Label Name="PortStatusLabel" Align="Center" HorizontalExpand="True"/> <Label Name="PortStatusLabel" Align="Center" HorizontalExpand="True"/>
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
<VBoxContainer VerticalExpand="True"> <BoxContainer Orientation="Vertical" VerticalExpand="True">
<Label Text="{Loc comp-gas-canister-ui-holding-tank-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/> <Label Text="{Loc comp-gas-canister-ui-holding-tank-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc comp-gas-canister-ui-holding-tank-label}"/> <Label Text="{Loc comp-gas-canister-ui-holding-tank-label}"/>
<Label Name="TankLabelLabel" Text="{Loc comp-gas-canister-ui-holding-tank-label-empty}" Align="Center" HorizontalExpand="True"/> <Label Name="TankLabelLabel" Text="{Loc comp-gas-canister-ui-holding-tank-label-empty}" Align="Center" HorizontalExpand="True"/>
<Button Name="TankEjectButton" Text="{Loc comp-gas-canister-ui-holding-tank-eject}"/> <Button Name="TankEjectButton" Text="{Loc comp-gas-canister-ui-holding-tank-eject}"/>
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc comp-gas-canister-ui-holding-tank-pressure}"/> <Label Text="{Loc comp-gas-canister-ui-holding-tank-pressure}"/>
<Label Name="TankPressureLabel" Align="Center" HorizontalExpand="True"/> <Label Name="TankPressureLabel" Align="Center" HorizontalExpand="True"/>
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
<VBoxContainer VerticalExpand="True"> <BoxContainer Orientation="Vertical" VerticalExpand="True">
<Label Text="{Loc comp-gas-canister-ui-release-valve-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/> <Label Text="{Loc comp-gas-canister-ui-release-valve-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<Label Text="{Loc comp-gas-canister-ui-release-pressure}"/> <Label Text="{Loc comp-gas-canister-ui-release-pressure}"/>
<Control VerticalExpand="True"/> <Control VerticalExpand="True"/>
</VBoxContainer> </BoxContainer>
<VBoxContainer HorizontalExpand="True" Margin="15 0 0 15" SeparationOverride="5"> <BoxContainer Orientation="Vertical" HorizontalExpand="True" Margin="15 0 0 15" SeparationOverride="5">
<Slider Name="ReleasePressureSlider" HorizontalExpand="True"/> <Slider Name="ReleasePressureSlider" HorizontalExpand="True"/>
<Label Name="ReleasePressureLabel" Align="Center" HorizontalExpand="True"/> <Label Name="ReleasePressureLabel" Align="Center" HorizontalExpand="True"/>
</VBoxContainer> </BoxContainer>
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Text="{Loc comp-gas-canister-ui-release-valve}"/> <Label Text="{Loc comp-gas-canister-ui-release-valve}"/>
<Control HorizontalExpand="True"/> <Control HorizontalExpand="True"/>
<Button Name="ReleaseValveOpenButton" Text="{Loc comp-gas-canister-ui-release-valve-open}" ToggleMode="True"/> <Button Name="ReleaseValveOpenButton" Text="{Loc comp-gas-canister-ui-release-valve-open}" ToggleMode="True"/>
<Button Name="ReleaseValveCloseButton" Text="{Loc comp-gas-canister-ui-release-valve-close}" ToggleMode="True"/> <Button Name="ReleaseValveCloseButton" Text="{Loc comp-gas-canister-ui-release-valve-close}" ToggleMode="True"/>
<Control HorizontalExpand="True"/> <Control HorizontalExpand="True"/>
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -8,6 +8,7 @@ using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Robust.Client.UserInterface.Controls.BoxContainer;
using static Robust.Client.UserInterface.Controls.ItemList; using static Robust.Client.UserInterface.Controls.ItemList;
namespace Content.Client.Body.UI namespace Content.Client.Body.UI
@@ -25,8 +26,9 @@ namespace Content.Client.Body.UI
Owner = owner; Owner = owner;
Title = Loc.GetString("body-scanner-display-title"); Title = Loc.GetString("body-scanner-display-title");
var hSplit = new HBoxContainer var hSplit = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
// Left half // Left half
@@ -39,20 +41,23 @@ namespace Content.Client.Body.UI
} }
}, },
// Right half // Right half
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
// Top half of the right half // Top half of the right half
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
Children = Children =
{ {
(BodyPartLabel = new Label()), (BodyPartLabel = new Label()),
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label new Label

View File

@@ -5,6 +5,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Body.UI namespace Content.Client.Body.UI
{ {
@@ -12,7 +13,7 @@ namespace Content.Client.Body.UI
{ {
public delegate void OptionSelectedCallback(int selectedOptionData); public delegate void OptionSelectedCallback(int selectedOptionData);
private readonly VBoxContainer _optionsBox; private readonly BoxContainer _optionsBox;
private OptionSelectedCallback? _optionSelectedCallback; private OptionSelectedCallback? _optionSelectedCallback;
public SurgeryWindow() public SurgeryWindow()
@@ -21,8 +22,9 @@ namespace Content.Client.Body.UI
Title = Loc.GetString("surgery-window-title"); Title = Loc.GetString("surgery-window-title");
RectClipContent = true; RectClipContent = true;
var vSplitContainer = new VBoxContainer var vSplitContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new ScrollContainer new ScrollContainer
@@ -33,8 +35,9 @@ namespace Content.Client.Body.UI
VScrollEnabled = true, VScrollEnabled = true,
Children = Children =
{ {
(_optionsBox = new VBoxContainer (_optionsBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true HorizontalExpand = true
}) })
} }
@@ -94,8 +97,9 @@ namespace Content.Client.Body.UI
AddChild(Button); AddChild(Button);
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(SpriteView = new SpriteView (SpriteView = new SpriteView

View File

@@ -10,6 +10,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BaseButton; using static Robust.Client.UserInterface.Controls.BaseButton;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Cargo.UI namespace Content.Client.Cargo.UI
{ {
@@ -27,12 +28,12 @@ namespace Content.Client.Cargo.UI
private Label _pointsLabel { get; set; } private Label _pointsLabel { get; set; }
private Label _shuttleStatusLabel { get; set; } private Label _shuttleStatusLabel { get; set; }
private Label _shuttleCapacityLabel { get; set; } private Label _shuttleCapacityLabel { get; set; }
private VBoxContainer _requests { get; set; } private BoxContainer _requests { get; set; }
private VBoxContainer _orders { get; set; } private BoxContainer _orders { get; set; }
private OptionButton _categories { get; set; } private OptionButton _categories { get; set; }
private LineEdit _searchBar { get; set; } private LineEdit _searchBar { get; set; }
public VBoxContainer Products { get; set; } public BoxContainer Products { get; set; }
public Button CallShuttleButton { get; set; } public Button CallShuttleButton { get; set; }
public Button PermissionsButton { get; set; } public Button PermissionsButton { get; set; }
@@ -49,9 +50,15 @@ namespace Content.Client.Cargo.UI
else else
Title = Loc.GetString("cargo-console-menu-title"); Title = Loc.GetString("cargo-console-menu-title");
var rows = new VBoxContainer(); var rows = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
var accountName = new HBoxContainer(); var accountName = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var accountNameLabel = new Label { var accountNameLabel = new Label {
Text = Loc.GetString("cargo-console-menu-account-name-label") + " ", Text = Loc.GetString("cargo-console-menu-account-name-label") + " ",
StyleClasses = { StyleNano.StyleClassLabelKeyText } StyleClasses = { StyleNano.StyleClassLabelKeyText }
@@ -63,7 +70,10 @@ namespace Content.Client.Cargo.UI
accountName.AddChild(_accountNameLabel); accountName.AddChild(_accountNameLabel);
rows.AddChild(accountName); rows.AddChild(accountName);
var points = new HBoxContainer(); var points = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var pointsLabel = new Label var pointsLabel = new Label
{ {
Text = Loc.GetString("cargo-console-menu-points-label") + " ", Text = Loc.GetString("cargo-console-menu-points-label") + " ",
@@ -77,7 +87,10 @@ namespace Content.Client.Cargo.UI
points.AddChild(_pointsLabel); points.AddChild(_pointsLabel);
rows.AddChild(points); rows.AddChild(points);
var shuttleStatus = new HBoxContainer(); var shuttleStatus = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var shuttleStatusLabel = new Label var shuttleStatusLabel = new Label
{ {
Text = Loc.GetString("cargo-console-menu-shuttle-status-label") + " ", Text = Loc.GetString("cargo-console-menu-shuttle-status-label") + " ",
@@ -91,7 +104,10 @@ namespace Content.Client.Cargo.UI
shuttleStatus.AddChild(_shuttleStatusLabel); shuttleStatus.AddChild(_shuttleStatusLabel);
rows.AddChild(shuttleStatus); rows.AddChild(shuttleStatus);
var shuttleCapacity = new HBoxContainer(); var shuttleCapacity = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var shuttleCapacityLabel = new Label var shuttleCapacityLabel = new Label
{ {
Text = Loc.GetString("cargo-console-menu-order-capacity-label") + " ", Text = Loc.GetString("cargo-console-menu-order-capacity-label") + " ",
@@ -105,7 +121,10 @@ namespace Content.Client.Cargo.UI
shuttleCapacity.AddChild(_shuttleCapacityLabel); shuttleCapacity.AddChild(_shuttleCapacityLabel);
rows.AddChild(shuttleCapacity); rows.AddChild(shuttleCapacity);
var buttons = new HBoxContainer(); var buttons = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
CallShuttleButton = new Button() CallShuttleButton = new Button()
{ {
//Text = Loc.GetString("Call Shuttle"), //Text = Loc.GetString("Call Shuttle"),
@@ -122,7 +141,10 @@ namespace Content.Client.Cargo.UI
buttons.AddChild(PermissionsButton); buttons.AddChild(PermissionsButton);
rows.AddChild(buttons); rows.AddChild(buttons);
var category = new HBoxContainer(); var category = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
_categories = new OptionButton _categories = new OptionButton
{ {
Prefix = Loc.GetString("cargo-console-menu-categories-label") + " ", Prefix = Loc.GetString("cargo-console-menu-categories-label") + " ",
@@ -145,8 +167,9 @@ namespace Content.Client.Cargo.UI
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 6 SizeFlagsStretchRatio = 6
}; };
Products = new VBoxContainer() Products = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true VerticalExpand = true
}; };
@@ -163,17 +186,22 @@ namespace Content.Client.Cargo.UI
{ {
VerticalExpand = true VerticalExpand = true
}; };
var rAndOVBox = new VBoxContainer(); var rAndOVBox = new BoxContainer
var requestsLabel = new Label { Text = Loc.GetString("cargo-console-menu-requests-label") };
_requests = new VBoxContainer // replace with scroll box so that approval buttons can be added
{ {
Orientation = LayoutOrientation.Vertical
};
var requestsLabel = new Label { Text = Loc.GetString("cargo-console-menu-requests-label") };
_requests = new BoxContainer // replace with scroll box so that approval buttons can be added
{
Orientation = LayoutOrientation.Vertical,
StyleClasses = { "transparentItemList" }, StyleClasses = { "transparentItemList" },
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 1, SizeFlagsStretchRatio = 1,
}; };
var ordersLabel = new Label { Text = Loc.GetString("cargo-console-menu-orders-label") }; var ordersLabel = new Label { Text = Loc.GetString("cargo-console-menu-orders-label") };
_orders = new VBoxContainer _orders = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
StyleClasses = { "transparentItemList" }, StyleClasses = { "transparentItemList" },
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 1, SizeFlagsStretchRatio = 1,
@@ -385,8 +413,9 @@ namespace Content.Client.Cargo.UI
}; };
AddChild(MainButton); AddChild(MainButton);
var hBox = new HBoxContainer var hBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true HorizontalExpand = true
}; };
@@ -432,8 +461,9 @@ namespace Content.Client.Cargo.UI
{ {
HorizontalExpand = true; HorizontalExpand = true;
var hBox = new HBoxContainer var hBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
}; };
@@ -444,8 +474,9 @@ namespace Content.Client.Cargo.UI
}; };
hBox.AddChild(Icon); hBox.AddChild(Icon);
var vBox = new VBoxContainer var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true VerticalExpand = true
}; };

View File

@@ -3,6 +3,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Cargo.UI namespace Content.Client.Cargo.UI
{ {
@@ -19,7 +20,10 @@ namespace Content.Client.Cargo.UI
Title = Loc.GetString("cargo-console-order-menu-title"); Title = Loc.GetString("cargo-console-order-menu-title");
var vBox = new VBoxContainer(); var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
var gridContainer = new GridContainer { Columns = 2 }; var gridContainer = new GridContainer { Columns = 2 };
var requesterLabel = new Label { Text = Loc.GetString("cargo-console-order-menu-requester-label") }; var requesterLabel = new Label { Text = Loc.GetString("cargo-console-order-menu-requester-label") };

View File

@@ -3,20 +3,20 @@
xmlns:ui="clr-namespace:Content.Client.HUD.UI" xmlns:ui="clr-namespace:Content.Client.HUD.UI"
MinSize="500 400" MouseFilter="Stop"> MinSize="500 400" MouseFilter="Stop">
<PanelContainer StyleClasses="AngleRect" /> <PanelContainer StyleClasses="AngleRect" />
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Margin="6 0 0 0" HorizontalExpand="True" Text="{Loc 'changelog-window-title'}" VAlign="Center" <Label Margin="6 0 0 0" HorizontalExpand="True" Text="{Loc 'changelog-window-title'}" VAlign="Center"
StyleClasses="LabelHeading" /> StyleClasses="LabelHeading" />
<TextureButton Margin="0 0 8 0" Name="CloseButton" StyleClasses="windowCloseButton" <TextureButton Margin="0 0 8 0" Name="CloseButton" StyleClasses="windowCloseButton"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
</HBoxContainer> </BoxContainer>
<ui:HighDivider /> <ui:HighDivider />
<ScrollContainer VerticalExpand="True" HScrollEnabled="False"> <ScrollContainer VerticalExpand="True" HScrollEnabled="False">
<VBoxContainer Name="ChangelogBody" /> <BoxContainer Orientation="Vertical" Name="ChangelogBody" />
</ScrollContainer> </ScrollContainer>
<PanelContainer StyleClasses="LowDivider" /> <PanelContainer StyleClasses="LowDivider" />
<Label Name="VersionLabel" HorizontalAlignment="Right" StyleClasses="LabelSubText" Margin="4 0" /> <Label Name="VersionLabel" HorizontalAlignment="Right" StyleClasses="LabelSubText" Margin="4 0" />
</VBoxContainer> </BoxContainer>
</changelog:ChangelogWindow> </changelog:ChangelogWindow>

View File

@@ -15,6 +15,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Content.Client.Changelog.ChangelogManager; using static Content.Client.Changelog.ChangelogManager;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Changelog namespace Content.Client.Changelog
{ {
@@ -94,10 +95,14 @@ namespace Content.Client.Changelog
var upArrow = var upArrow =
_resourceCache.GetTexture("/Textures/Interface/Changelog/up_arrow.svg.192dpi.png"); _resourceCache.GetTexture("/Textures/Interface/Changelog/up_arrow.svg.192dpi.png");
var readDivider = new VBoxContainer(); var readDivider = new BoxContainer
var hBox = new HBoxContainer
{ {
Orientation = LayoutOrientation.Vertical
};
var hBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
HorizontalAlignment = HAlignment.Center, HorizontalAlignment = HAlignment.Center,
Children = Children =
{ {
@@ -148,8 +153,9 @@ namespace Content.Client.Changelog
{ {
var text = new RichTextLabel(); var text = new RichTextLabel();
text.SetMessage(FormattedMessage.FromMarkup(change.Message)); text.SetMessage(FormattedMessage.FromMarkup(change.Message));
ChangelogBody.AddChild(new HBoxContainer ChangelogBody.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Margin = new Thickness(14, 1, 10, 2), Margin = new Thickness(14, 1, 10, 2),
Children = Children =
{ {

View File

@@ -13,6 +13,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Content.Shared.CharacterAppearance.Components.SharedMagicMirrorComponent; using static Content.Shared.CharacterAppearance.Components.SharedMagicMirrorComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.CharacterAppearance namespace Content.Client.CharacterAppearance
{ {
@@ -107,8 +108,9 @@ namespace Content.Client.CharacterAppearance
MinSize = (50, 0) MinSize = (50, 0)
}; };
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
_slider, _slider,
@@ -204,10 +206,16 @@ namespace Content.Client.CharacterAppearance
{ {
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
var vBox = new VBoxContainer(); var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
AddChild(vBox); AddChild(vBox);
_colorContainer = new VBoxContainer(); _colorContainer = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
vBox.AddChild(_colorContainer); vBox.AddChild(_colorContainer);
_colorContainer.AddChild(_colorSliderR = new ColorSlider(StyleNano.StyleClassSliderRed)); _colorContainer.AddChild(_colorSliderR = new ColorSlider(StyleNano.StyleClassSliderRed));
_colorContainer.AddChild(_colorSliderG = new ColorSlider(StyleNano.StyleClassSliderGreen)); _colorContainer.AddChild(_colorSliderG = new ColorSlider(StyleNano.StyleClassSliderGreen));
@@ -289,7 +297,10 @@ namespace Content.Client.CharacterAppearance
public EyeColorPicker() public EyeColorPicker()
{ {
var vBox = new VBoxContainer(); var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
AddChild(vBox); AddChild(vBox);
vBox.AddChild(_colorSliderR = new ColorSlider(StyleNano.StyleClassSliderRed)); vBox.AddChild(_colorSliderR = new ColorSlider(StyleNano.StyleClassSliderRed));
@@ -340,8 +351,9 @@ namespace Content.Client.CharacterAppearance
_eyeColorPicker = new EyeColorPicker {SizeFlagsHorizontal = SizeFlags.FillExpand}; _eyeColorPicker = new EyeColorPicker {SizeFlagsHorizontal = SizeFlags.FillExpand};
_eyeColorPicker.OnEyeColorPicked += newColor => owner.EyeColorSelected(newColor); _eyeColorPicker.OnEyeColorPicked += newColor => owner.EyeColorSelected(newColor);
Contents.AddChild(new HBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 8, SeparationOverride = 8,
Children = {_hairStylePicker, _facialHairStylePicker, _eyeColorPicker} Children = {_hairStylePicker, _facialHairStylePicker, _eyeColorPicker}
}); });

View File

@@ -62,19 +62,21 @@ namespace Content.Client.CharacterInfo.Components
public Label NameLabel { get; } public Label NameLabel { get; }
public Label SubText { get; } public Label SubText { get; }
public VBoxContainer ObjectivesContainer { get; } public BoxContainer ObjectivesContainer { get; }
public CharacterInfoControl(IResourceCache resourceCache) public CharacterInfoControl(IResourceCache resourceCache)
{ {
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(SpriteView = new SpriteView { Scale = (2, 2)}), (SpriteView = new SpriteView { Scale = (2, 2)}),
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalAlignment = VAlignment.Top, VerticalAlignment = VAlignment.Top,
Children = Children =
{ {
@@ -100,7 +102,10 @@ namespace Content.Client.CharacterInfo.Components
Text = Loc.GetString("character-info-objectives-label"), Text = Loc.GetString("character-info-objectives-label"),
HorizontalAlignment = HAlignment.Center HorizontalAlignment = HAlignment.Center
}); });
ObjectivesContainer = new VBoxContainer(); ObjectivesContainer = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
AddChild(ObjectivesContainer); AddChild(ObjectivesContainer);
AddChild(new Placeholder() AddChild(new Placeholder()
@@ -116,8 +121,9 @@ namespace Content.Client.CharacterInfo.Components
ObjectivesContainer.RemoveAllChildren(); ObjectivesContainer.RemoveAllChildren();
foreach (var (groupId, objectiveConditions) in characterInfoMessage.Objectives) foreach (var (groupId, objectiveConditions) in characterInfoMessage.Objectives)
{ {
var vbox = new VBoxContainer var vbox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Modulate = Color.Gray Modulate = Color.Gray
}; };
@@ -129,7 +135,10 @@ namespace Content.Client.CharacterInfo.Components
foreach (var objectiveCondition in objectiveConditions) foreach (var objectiveCondition in objectiveConditions)
{ {
var hbox = new HBoxContainer(); var hbox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
hbox.AddChild(new ProgressTextureRect hbox.AddChild(new ProgressTextureRect
{ {
Texture = objectiveCondition.SpriteSpecifier.Frame0(), Texture = objectiveCondition.SpriteSpecifier.Frame0(),
@@ -140,8 +149,9 @@ namespace Content.Client.CharacterInfo.Components
{ {
MinSize = (10,0) MinSize = (10,0)
}); });
hbox.AddChild(new VBoxContainer hbox.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new Label{Text = objectiveCondition.Title}, new Label{Text = objectiveCondition.Title},

View File

@@ -9,6 +9,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.CharacterInterface namespace Content.Client.CharacterInterface
{ {
@@ -110,14 +111,17 @@ namespace Content.Client.CharacterInterface
/// </summary> /// </summary>
public class CharacterWindow : SS14Window public class CharacterWindow : SS14Window
{ {
private readonly VBoxContainer _contentsVBox; private readonly BoxContainer _contentsVBox;
private readonly List<ICharacterUI> _windowComponents; private readonly List<ICharacterUI> _windowComponents;
public CharacterWindow(List<ICharacterUI> windowComponents) public CharacterWindow(List<ICharacterUI> windowComponents)
{ {
Title = "Character"; Title = "Character";
_contentsVBox = new VBoxContainer(); _contentsVBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
Contents.AddChild(_contentsVBox); Contents.AddChild(_contentsVBox);
windowComponents.Sort((a, b) => ((int) a.Priority).CompareTo((int) b.Priority)); windowComponents.Sort((a, b) => ((int) a.Priority).CompareTo((int) b.Priority));

View File

@@ -19,6 +19,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Chat.UI namespace Content.Client.Chat.UI
{ {
@@ -78,11 +79,11 @@ namespace Content.Client.Chat.UI
private readonly Popup _channelSelectorPopup; private readonly Popup _channelSelectorPopup;
private readonly Button _channelSelector; private readonly Button _channelSelector;
private readonly HBoxContainer _channelSelectorHBox; private readonly BoxContainer _channelSelectorHBox;
private readonly FilterButton _filterButton; private readonly FilterButton _filterButton;
private readonly Popup _filterPopup; private readonly Popup _filterPopup;
private readonly PanelContainer _filterPopupPanel; private readonly PanelContainer _filterPopupPanel;
private readonly VBoxContainer _filterVBox; private readonly BoxContainer _filterVBox;
private DragMode _currentDrag = DragMode.None; private DragMode _currentDrag = DragMode.None;
private Vector2 _dragOffsetTopLeft; private Vector2 _dragOffsetTopLeft;
private Vector2 _dragOffsetBottomRight; private Vector2 _dragOffsetBottomRight;
@@ -126,8 +127,9 @@ namespace Content.Client.Chat.UI
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(Contents = new OutputPanel (Contents = new OutputPanel
@@ -140,8 +142,9 @@ namespace Content.Client.Chat.UI
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
SeparationOverride = 4, SeparationOverride = 4,
Children = Children =
@@ -181,13 +184,15 @@ namespace Content.Client.Chat.UI
StyleClasses = {StyleNano.StyleClassBorderedWindowPanel}, StyleClasses = {StyleNano.StyleClassBorderedWindowPanel},
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Control{MinSize = (4,0)}, new Control{MinSize = (4,0)},
(_filterVBox = new VBoxContainer (_filterVBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
SeparationOverride = 4 SeparationOverride = 4
}) })
} }
@@ -201,8 +206,9 @@ namespace Content.Client.Chat.UI
{ {
Children = Children =
{ {
(_channelSelectorHBox = new HBoxContainer (_channelSelectorHBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 1 SeparationOverride = 1
}) })
} }

View File

@@ -14,6 +14,7 @@ using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Content.Shared.Chemistry.Components.SharedChemMasterComponent; using static Content.Shared.Chemistry.Components.SharedChemMasterComponent;
using static Robust.Client.UserInterface.Controls.BaseButton; using static Robust.Client.UserInterface.Controls.BaseButton;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Chemistry.UI namespace Content.Client.Chemistry.UI
{ {
@@ -25,11 +26,11 @@ namespace Content.Client.Chemistry.UI
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
/// <summary>Contains info about the reagent container such as it's contents, if one is loaded into the dispenser.</summary> /// <summary>Contains info about the reagent container such as it's contents, if one is loaded into the dispenser.</summary>
private readonly VBoxContainer ContainerInfo; private readonly BoxContainer ContainerInfo;
private readonly VBoxContainer BufferInfo; private readonly BoxContainer BufferInfo;
private readonly VBoxContainer PackagingInfo; private readonly BoxContainer PackagingInfo;
/// <summary>Ejects the reagent container from the dispenser.</summary> /// <summary>Ejects the reagent container from the dispenser.</summary>
public Button EjectButton { get; } public Button EjectButton { get; }
@@ -41,8 +42,8 @@ namespace Content.Client.Chemistry.UI
public event Action<ButtonEventArgs, ChemButton>? OnChemButtonPressed; public event Action<ButtonEventArgs, ChemButton>? OnChemButtonPressed;
public HBoxContainer PillInfo { get; set; } public BoxContainer PillInfo { get; set; }
public HBoxContainer BottleInfo { get; set; } public BoxContainer BottleInfo { get; set; }
public SpinBox PillAmount { get; set; } public SpinBox PillAmount { get; set; }
public SpinBox BottleAmount { get; set; } public SpinBox BottleAmount { get; set; }
public Button CreatePills { get; } public Button CreatePills { get; }
@@ -57,13 +58,15 @@ namespace Content.Client.Chemistry.UI
MinSize = SetSize = (400, 525); MinSize = SetSize = (400, 525);
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
//Container //Container
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("chem-master-window-container-label")}, new Label {Text = Loc.GetString("chem-master-window-container-label")},
@@ -84,8 +87,9 @@ namespace Content.Client.Chemistry.UI
Children = Children =
{ {
//Currently empty, when server sends state data this will have container contents and fill volume. //Currently empty, when server sends state data this will have container contents and fill volume.
(ContainerInfo = new VBoxContainer (ContainerInfo = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -102,8 +106,9 @@ namespace Content.Client.Chemistry.UI
new Control {MinSize = (0.0f, 10.0f)}, new Control {MinSize = (0.0f, 10.0f)},
//Buffer //Buffer
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("chem-master-window-buffer-text")}, new Label {Text = Loc.GetString("chem-master-window-buffer-text")},
@@ -126,8 +131,9 @@ namespace Content.Client.Chemistry.UI
Children = Children =
{ {
//Buffer reagent list //Buffer reagent list
(BufferInfo = new VBoxContainer (BufferInfo = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -144,8 +150,9 @@ namespace Content.Client.Chemistry.UI
new Control {MinSize = (0.0f, 10.0f)}, new Control {MinSize = (0.0f, 10.0f)},
//Packaging //Packaging
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = $"{Loc.GetString("chem-master-window-packaging-text")} "}, new Label {Text = $"{Loc.GetString("chem-master-window-packaging-text")} "},
@@ -165,8 +172,9 @@ namespace Content.Client.Chemistry.UI
Children = Children =
{ {
//Packaging options //Packaging options
(PackagingInfo = new VBoxContainer (PackagingInfo = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
}), }),
@@ -176,8 +184,9 @@ namespace Content.Client.Chemistry.UI
}); });
//Pills //Pills
PillInfo = new HBoxContainer PillInfo = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label new Label
@@ -213,8 +222,9 @@ namespace Content.Client.Chemistry.UI
PillInfo.AddChild(CreatePills); PillInfo.AddChild(CreatePills);
//Bottles //Bottles
BottleInfo = new HBoxContainer BottleInfo = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label new Label
@@ -315,8 +325,9 @@ namespace Content.Client.Chemistry.UI
return; return;
} }
ContainerInfo.Children.Add(new HBoxContainer // Name of the container and its fill status (Ex: 44/100u) ContainerInfo.Children.Add(new BoxContainer // Name of the container and its fill status (Ex: 44/100u)
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = $"{state.ContainerName}: "}, new Label {Text = $"{state.ContainerName}: "},
@@ -339,8 +350,9 @@ namespace Content.Client.Chemistry.UI
if (proto != null) if (proto != null)
{ {
ContainerInfo.Children.Add(new HBoxContainer ContainerInfo.Children.Add(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = $"{name}: "}, new Label {Text = $"{name}: "},
@@ -371,7 +383,10 @@ namespace Content.Client.Chemistry.UI
return; return;
} }
var bufferHBox = new HBoxContainer(); var bufferHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
BufferInfo.AddChild(bufferHBox); BufferInfo.AddChild(bufferHBox);
var bufferLabel = new Label { Text = $"{Loc.GetString("chem-master-window-buffer-label")} " }; var bufferLabel = new Label { Text = $"{Loc.GetString("chem-master-window-buffer-label")} " };
@@ -394,8 +409,9 @@ namespace Content.Client.Chemistry.UI
if (proto != null) if (proto != null)
{ {
BufferInfo.Children.Add(new HBoxContainer BufferInfo.Children.Add(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
//SizeFlagsHorizontal = SizeFlags.ShrinkEnd, //SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
Children = Children =
{ {

View File

@@ -12,6 +12,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Content.Shared.Chemistry.Dispenser.SharedReagentDispenserComponent; using static Content.Shared.Chemistry.Dispenser.SharedReagentDispenserComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Chemistry.UI namespace Content.Client.Chemistry.UI
{ {
@@ -23,7 +24,7 @@ namespace Content.Client.Chemistry.UI
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
/// <summary>Contains info about the reagent container such as it's contents, if one is loaded into the dispenser.</summary> /// <summary>Contains info about the reagent container such as it's contents, if one is loaded into the dispenser.</summary>
private readonly VBoxContainer ContainerInfo; private readonly BoxContainer ContainerInfo;
/// <summary>Sets the dispense amount to 1 when pressed.</summary> /// <summary>Sets the dispense amount to 1 when pressed.</summary>
public Button DispenseButton1 { get; } public Button DispenseButton1 { get; }
@@ -72,13 +73,15 @@ namespace Content.Client.Chemistry.UI
var dispenseAmountGroup = new ButtonGroup(); var dispenseAmountGroup = new ButtonGroup();
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
//First, our dispense amount buttons //First, our dispense amount buttons
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("reagent-dispenser-window-amount-to-dispense-label")}, new Label {Text = Loc.GetString("reagent-dispenser-window-amount-to-dispense-label")},
@@ -104,8 +107,9 @@ namespace Content.Client.Chemistry.UI
}), }),
//Padding //Padding
new Control {MinSize = (0.0f, 10.0f)}, new Control {MinSize = (0.0f, 10.0f)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("reagent-dispenser-window-container-label") + " "}, new Label {Text = Loc.GetString("reagent-dispenser-window-container-label") + " "},
@@ -126,8 +130,9 @@ namespace Content.Client.Chemistry.UI
Children = Children =
{ {
//Currently empty, when server sends state data this will have container contents and fill volume. //Currently empty, when server sends state data this will have container contents and fill volume.
(ContainerInfo = new VBoxContainer (ContainerInfo = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -263,8 +268,9 @@ namespace Content.Client.Chemistry.UI
return; return;
} }
ContainerInfo.Children.Add(new HBoxContainer // Name of the container and its fill status (Ex: 44/100u) ContainerInfo.Children.Add(new BoxContainer // Name of the container and its fill status (Ex: 44/100u)
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = $"{state.ContainerName}: "}, new Label {Text = $"{state.ContainerName}: "},
@@ -293,8 +299,9 @@ namespace Content.Client.Chemistry.UI
//Check if the reagent is being moused over. If so, color it green. //Check if the reagent is being moused over. If so, color it green.
if (proto != null && proto.ID == highlightedReagentId) if (proto != null && proto.ID == highlightedReagentId)
{ {
ContainerInfo.Children.Add(new HBoxContainer ContainerInfo.Children.Add(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label new Label
@@ -312,8 +319,9 @@ namespace Content.Client.Chemistry.UI
} }
else //Otherwise, color it the normal colors. else //Otherwise, color it the normal colors.
{ {
ContainerInfo.Children.Add(new HBoxContainer ContainerInfo.Children.Add(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = $"{name}: "}, new Label {Text = $"{name}: "},

View File

@@ -2,6 +2,7 @@ using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Cloning.UI namespace Content.Client.Cloning.UI
{ {
@@ -15,21 +16,24 @@ namespace Content.Client.Cloning.UI
Title = Loc.GetString("accept-cloning-window-title"); Title = Loc.GetString("accept-cloning-window-title");
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(new Label() (new Label()
{ {
Text = Loc.GetString("accept-cloning-window-prompt-text-part") Text = Loc.GetString("accept-cloning-window-prompt-text-part")
}), }),
new HBoxContainer new BoxContainer
{ {
Align = BoxContainer.AlignMode.Center, Orientation = LayoutOrientation.Horizontal,
Align = AlignMode.Center,
Children = Children =
{ {
(AcceptButton = new Button (AcceptButton = new Button

View File

@@ -9,6 +9,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using static Content.Shared.Cloning.SharedCloningPodComponent; using static Content.Shared.Cloning.SharedCloningPodComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Cloning.UI namespace Content.Client.Cloning.UI
{ {
@@ -16,7 +17,7 @@ namespace Content.Client.Cloning.UI
{ {
private Dictionary<int, string?> _scanManager; private Dictionary<int, string?> _scanManager;
private readonly VBoxContainer _scanList; private readonly BoxContainer _scanList;
public readonly Button CloneButton; public readonly Button CloneButton;
public readonly Button EjectButton; public readonly Button EjectButton;
private CloningScanButton? _selectedButton; private CloningScanButton? _selectedButton;
@@ -35,8 +36,9 @@ namespace Content.Client.Cloning.UI
Title = Loc.GetString("cloning-pod-window-title"); Title = Loc.GetString("cloning-pod-window-title");
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new ScrollContainer new ScrollContainer
@@ -45,11 +47,15 @@ namespace Content.Client.Cloning.UI
VerticalExpand = true, VerticalExpand = true,
Children = Children =
{ {
(_scanList = new VBoxContainer()) (_scanList = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
})
} }
}, },
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(CloneButton = new Button (CloneButton = new Button
@@ -74,8 +80,9 @@ namespace Content.Client.Cloning.UI
{ {
Text = Loc.GetString("cloning-pod-eject-body-button") Text = Loc.GetString("cloning-pod-eject-body-button")
}), }),
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label() new Label()
@@ -219,8 +226,9 @@ namespace Content.Client.Cloning.UI
ToggleMode = true, ToggleMode = true,
}); });
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(EntityTextureRect = new TextureRect (EntityTextureRect = new TextureRect

View File

@@ -5,6 +5,7 @@ using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
using Timer = Robust.Shared.Timing.Timer; using Timer = Robust.Shared.Timing.Timer;
namespace Content.Client.Communications.UI namespace Content.Client.Communications.UI
@@ -42,7 +43,12 @@ namespace Content.Client.Communications.UI
EmergencyShuttleButton.OnPressed += (_) => Owner.EmergencyShuttleButtonPressed(); EmergencyShuttleButton.OnPressed += (_) => Owner.EmergencyShuttleButtonPressed();
EmergencyShuttleButton.Disabled = !owner.CanCall; EmergencyShuttleButton.Disabled = !owner.CanCall;
var vbox = new VBoxContainer() {HorizontalExpand = true, VerticalExpand = true}; var vbox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true,
VerticalExpand = true
};
vbox.AddChild(_messageInput); vbox.AddChild(_messageInput);
vbox.AddChild(new Control(){MinSize = new Vector2(0,10), HorizontalExpand = true}); vbox.AddChild(new Control(){MinSize = new Vector2(0,10), HorizontalExpand = true});
vbox.AddChild(AnnounceButton); vbox.AddChild(AnnounceButton);
@@ -50,7 +56,12 @@ namespace Content.Client.Communications.UI
vbox.AddChild(_countdownLabel); vbox.AddChild(_countdownLabel);
vbox.AddChild(EmergencyShuttleButton); vbox.AddChild(EmergencyShuttleButton);
var hbox = new HBoxContainer() {HorizontalExpand = true, VerticalExpand = true}; var hbox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true,
VerticalExpand = true
};
hbox.AddChild(new Control(){MinSize = new Vector2(100,0), HorizontalExpand = true}); hbox.AddChild(new Control(){MinSize = new Vector2(100,0), HorizontalExpand = true});
hbox.AddChild(vbox); hbox.AddChild(vbox);
hbox.AddChild(new Control(){MinSize = new Vector2(100,0), HorizontalExpand = true}); hbox.AddChild(new Control(){MinSize = new Vector2(100,0), HorizontalExpand = true});

View File

@@ -6,6 +6,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Content.Shared.Configurable.SharedConfigurationComponent; using static Content.Shared.Configurable.SharedConfigurationComponent;
using static Robust.Client.UserInterface.Controls.BaseButton; using static Robust.Client.UserInterface.Controls.BaseButton;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Configurable.UI namespace Content.Client.Configurable.UI
{ {
@@ -13,9 +14,8 @@ namespace Content.Client.Configurable.UI
{ {
public ConfigurationBoundUserInterface Owner { get; } public ConfigurationBoundUserInterface Owner { get; }
private readonly VBoxContainer _baseContainer; private readonly BoxContainer _column;
private readonly VBoxContainer _column; private readonly BoxContainer _row;
private readonly HBoxContainer _row;
private readonly List<(string name, LineEdit input)> _inputs; private readonly List<(string name, LineEdit input)> _inputs;
@@ -28,20 +28,23 @@ namespace Content.Client.Configurable.UI
Title = Loc.GetString("configuration-menu-device-title"); Title = Loc.GetString("configuration-menu-device-title");
_baseContainer = new VBoxContainer BoxContainer baseContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
HorizontalExpand = true HorizontalExpand = true
}; };
_column = new VBoxContainer _column = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(8), Margin = new Thickness(8),
SeparationOverride = 16, SeparationOverride = 16,
}; };
_row = new HBoxContainer _row = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 16, SeparationOverride = 16,
HorizontalExpand = true HorizontalExpand = true
}; };
@@ -63,9 +66,9 @@ namespace Content.Client.Configurable.UI
}; };
outerColumn.AddChild(_column); outerColumn.AddChild(_column);
_baseContainer.AddChild(outerColumn); baseContainer.AddChild(outerColumn);
_baseContainer.AddChild(confirmButton); baseContainer.AddChild(confirmButton);
Contents.AddChild(_baseContainer); Contents.AddChild(baseContainer);
} }
public void Populate(ConfigurationBoundUserInterfaceState state) public void Populate(ConfigurationBoundUserInterfaceState state)
@@ -97,7 +100,10 @@ namespace Content.Client.Configurable.UI
_inputs.Add((field.Key, input)); _inputs.Add((field.Key, input));
var row = new HBoxContainer(); var row = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
CopyProperties(_row, row); CopyProperties(_row, row);
row.AddChild(label); row.AddChild(label);

View File

@@ -1,32 +1,32 @@
<SS14Window xmlns="https://spacestation14.io"> <SS14Window xmlns="https://spacestation14.io">
<HBoxContainer HorizontalExpand="True"> <BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<VBoxContainer HorizontalExpand="True" SizeFlagsStretchRatio="0.4"> <BoxContainer Orientation="Vertical" HorizontalExpand="True" SizeFlagsStretchRatio="0.4">
<HBoxContainer HorizontalExpand="True"> <BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<LineEdit Name="SearchBar" PlaceHolder="Search" HorizontalExpand="True"/> <LineEdit Name="SearchBar" PlaceHolder="Search" HorizontalExpand="True"/>
<OptionButton Name="Category" MinSize="130 0"/> <OptionButton Name="Category" MinSize="130 0"/>
</HBoxContainer> </BoxContainer>
<ItemList Name="RecipesList" SelectMode="Single" VerticalExpand="True"/> <ItemList Name="RecipesList" SelectMode="Single" VerticalExpand="True"/>
</VBoxContainer> </BoxContainer>
<Control MinSize="10 0"/> <Control MinSize="10 0"/>
<VBoxContainer HorizontalExpand="True" SizeFlagsStretchRatio="0.6"> <BoxContainer Orientation="Vertical" HorizontalExpand="True" SizeFlagsStretchRatio="0.6">
<Control> <Control>
<HBoxContainer Align="Center"> <BoxContainer Orientation="Horizontal" Align="Center">
<TextureRect Name="TargetTexture" HorizontalAlignment="Right" Stretch="Keep"/> <TextureRect Name="TargetTexture" HorizontalAlignment="Right" Stretch="Keep"/>
<Control MinSize="10 0"/> <Control MinSize="10 0"/>
<VBoxContainer> <BoxContainer Orientation="Vertical">
<RichTextLabel Name="TargetName"/> <RichTextLabel Name="TargetName"/>
<RichTextLabel Name="TargetDesc"/> <RichTextLabel Name="TargetDesc"/>
</VBoxContainer> </BoxContainer>
</HBoxContainer> </BoxContainer>
</Control> </Control>
<ItemList Name="StepList" VerticalExpand="True"/> <ItemList Name="StepList" VerticalExpand="True"/>
<VBoxContainer> <BoxContainer Orientation="Vertical">
<Button Name="BuildButton" Disabled="True" ToggleMode="True" VerticalExpand="True" SizeFlagsStretchRatio="0.5"/> <Button Name="BuildButton" Disabled="True" ToggleMode="True" VerticalExpand="True" SizeFlagsStretchRatio="0.5"/>
<HBoxContainer VerticalExpand="True" SizeFlagsStretchRatio="0.5"> <BoxContainer Orientation="Horizontal" VerticalExpand="True" SizeFlagsStretchRatio="0.5">
<Button Name="EraseButton" ToggleMode="True" HorizontalExpand="True" SizeFlagsStretchRatio="0.7"/> <Button Name="EraseButton" ToggleMode="True" HorizontalExpand="True" SizeFlagsStretchRatio="0.7"/>
<Button Name="ClearButton" HorizontalExpand="True" SizeFlagsStretchRatio="0.3"/> <Button Name="ClearButton" HorizontalExpand="True" SizeFlagsStretchRatio="0.3"/>
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
</HBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -13,6 +13,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
using Vector2 = Robust.Shared.Maths.Vector2; using Vector2 = Robust.Shared.Maths.Vector2;
namespace Content.Client.ContextMenu.UI namespace Content.Client.ContextMenu.UI
@@ -63,8 +64,9 @@ namespace Content.Client.ContextMenu.UI
OutlineComponent = ContextEntity.GetComponentOrNull<InteractionOutlineComponent>(); OutlineComponent = ContextEntity.GetComponentOrNull<InteractionOutlineComponent>();
AddChild( AddChild(
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new LayoutContainer new LayoutContainer
@@ -129,14 +131,16 @@ namespace Content.Client.ContextMenu.UI
LayoutContainer.SetGrowVertical(_label, LayoutContainer.GrowDirection.Begin); LayoutContainer.SetGrowVertical(_label, LayoutContainer.GrowDirection.Begin);
AddChild( AddChild(
new HBoxContainer() new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 6, SeparationOverride = 6,
Children = Children =
{ {
new LayoutContainer { Children = { _spriteView, _label } }, new LayoutContainer { Children = { _spriteView, _label } },
new HBoxContainer() new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 6, SeparationOverride = 6,
Children = Children =
{ {
@@ -179,7 +183,7 @@ namespace Content.Client.ContextMenu.UI
private const int MaxItemsBeforeScroll = 10; private const int MaxItemsBeforeScroll = 10;
private const int MarginSizeBetweenElements = 2; private const int MarginSizeBetweenElements = 2;
public VBoxContainer List { get; } public BoxContainer List { get; }
public int Depth { get; } public int Depth { get; }
public ContextMenuPopup(int depth = 0) public ContextMenuPopup(int depth = 0)
@@ -190,7 +194,10 @@ namespace Content.Client.ContextMenu.UI
HScrollEnabled = false, HScrollEnabled = false,
Children = { new PanelContainer Children = { new PanelContainer
{ {
Children = { (List = new VBoxContainer()) }, Children = { (List = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
}) },
PanelOverride = new StyleBoxFlat { BackgroundColor = MarginColor } PanelOverride = new StyleBoxFlat { BackgroundColor = MarginColor }
}} }}
}); });

View File

@@ -9,6 +9,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BaseButton; using static Robust.Client.UserInterface.Controls.BaseButton;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Crayon.UI namespace Content.Client.Crayon.UI
{ {
@@ -27,7 +28,10 @@ namespace Content.Client.Crayon.UI
Title = Loc.GetString("crayon-window-title"); Title = Loc.GetString("crayon-window-title");
Owner = owner; Owner = owner;
var vbox = new VBoxContainer(); var vbox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
Contents.AddChild(vbox); Contents.AddChild(vbox);
_search = new LineEdit(); _search = new LineEdit();

View File

@@ -16,6 +16,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel; using YamlDotNet.RepresentationModel;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Credits namespace Content.Client.Credits
{ {
@@ -71,8 +72,9 @@ namespace Content.Client.Credits
private void PopulateLicenses(ScrollContainer licensesList) private void PopulateLicenses(ScrollContainer licensesList)
{ {
var vBox = new VBoxContainer var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(2, 2, 0, 0) Margin = new Thickness(2, 2, 0, 0)
}; };
@@ -93,8 +95,9 @@ namespace Content.Client.Credits
private void PopulatePatronsList(Control patronsList) private void PopulatePatronsList(Control patronsList)
{ {
var vBox = new VBoxContainer var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(2, 2, 0, 0) Margin = new Thickness(2, 2, 0, 0)
}; };
var patrons = LoadPatrons(); var patrons = LoadPatrons();
@@ -152,13 +155,15 @@ namespace Content.Client.Credits
{ {
Button contributeButton; Button contributeButton;
var vBox = new VBoxContainer var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(2, 2, 0, 0) Margin = new Thickness(2, 2, 0, 0)
}; };
vBox.AddChild(new HBoxContainer vBox.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalAlignment = HAlignment.Center, HorizontalAlignment = HAlignment.Center,
SeparationOverride = 20, SeparationOverride = 20,
Children = Children =

View File

@@ -7,6 +7,7 @@ using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Content.Shared.Disposal.Components.SharedDisposalMailingUnitComponent; using static Content.Shared.Disposal.Components.SharedDisposalMailingUnitComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Disposal.UI namespace Content.Client.Disposal.UI
{ {
@@ -30,18 +31,21 @@ namespace Content.Client.Disposal.UI
{ {
MinSize = SetSize = (460, 230); MinSize = SetSize = (460, 230);
TargetList = new List<string>(); TargetList = new List<string>();
Contents.AddChild(new HBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
Margin = new Thickness(8, 0), Margin = new Thickness(8, 0),
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = $"{Loc.GetString("disposal-mailing-unit-window-state-label")} "}, new Label {Text = $"{Loc.GetString("disposal-mailing-unit-window-state-label")} "},
@@ -50,8 +54,9 @@ namespace Content.Client.Disposal.UI
} }
}, },
new Control {MinSize = (0, 10)}, new Control {MinSize = (0, 10)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -73,8 +78,9 @@ namespace Content.Client.Disposal.UI
} }
}, },
new Control {MinSize = (0, 10)}, new Control {MinSize = (0, 10)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -94,8 +100,9 @@ namespace Content.Client.Disposal.UI
} }
}, },
new Control {MinSize = (0, 10)}, new Control {MinSize = (0, 10)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -114,8 +121,9 @@ namespace Content.Client.Disposal.UI
} }
}, },
new Control {MinSize = (0, 10)}, new Control {MinSize = (0, 10)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(Power = new CheckButton {Text = Loc.GetString("disposal-mailing-unit-power-button")}), (Power = new CheckButton {Text = Loc.GetString("disposal-mailing-unit-power-button")}),
@@ -123,13 +131,15 @@ namespace Content.Client.Disposal.UI
} }
} }
}, },
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(12, 0, 8, 0), Margin = new Thickness(12, 0, 8, 0),
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label new Label
@@ -139,8 +149,9 @@ namespace Content.Client.Disposal.UI
} }
}, },
new Control {MinSize = new Vector2(0, 8)}, new Control {MinSize = new Vector2(0, 8)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalExpand = true, VerticalExpand = true,
Children = Children =
{ {
@@ -161,16 +172,19 @@ namespace Content.Client.Disposal.UI
HorizontalExpand = true, HorizontalExpand = true,
MinSize = new Vector2(0, 1), MinSize = new Vector2(0, 1),
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Margin = new Thickness(4, 0, 0, 0), Margin = new Thickness(4, 0, 0, 0),
Children = Children =
{ {

View File

@@ -4,6 +4,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Content.Shared.Disposal.Components.SharedDisposalRouterComponent; using static Content.Shared.Disposal.Components.SharedDisposalRouterComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Disposal.UI namespace Content.Client.Disposal.UI
{ {
@@ -20,14 +21,16 @@ namespace Content.Client.Disposal.UI
MinSize = SetSize = (500, 110); MinSize = SetSize = (500, 110);
Title = Loc.GetString("disposal-router-window-title"); Title = Loc.GetString("disposal-router-window-title");
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new Label {Text = Loc.GetString("disposal-router-window-tags-label")}, new Label {Text = Loc.GetString("disposal-router-window-tags-label")},
new Control {MinSize = (0, 10)}, new Control {MinSize = (0, 10)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(TagInput = new LineEdit (TagInput = new LineEdit

View File

@@ -4,6 +4,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Content.Shared.Disposal.Components.SharedDisposalTaggerComponent; using static Content.Shared.Disposal.Components.SharedDisposalTaggerComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Disposal.UI namespace Content.Client.Disposal.UI
{ {
@@ -20,14 +21,16 @@ namespace Content.Client.Disposal.UI
MinSize = SetSize = (500, 110); MinSize = SetSize = (500, 110);
Title = Loc.GetString("disposal-tagger-window-title"); Title = Loc.GetString("disposal-tagger-window-title");
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new Label {Text = Loc.GetString("disposal-tagger-window-tag-input-label")}, new Label {Text = Loc.GetString("disposal-tagger-window-tag-input-label")},
new Control {MinSize = (0, 10)}, new Control {MinSize = (0, 10)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(TagInput = new LineEdit (TagInput = new LineEdit

View File

@@ -8,6 +8,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Content.Shared.Disposal.Components.SharedDisposalUnitComponent; using static Content.Shared.Disposal.Components.SharedDisposalUnitComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Disposal.UI namespace Content.Client.Disposal.UI
{ {
@@ -27,12 +28,14 @@ namespace Content.Client.Disposal.UI
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
MinSize = SetSize = (300, 140); MinSize = SetSize = (300, 140);
Resizable = false; Resizable = false;
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 4, SeparationOverride = 4,
Children = Children =
{ {
@@ -41,8 +44,9 @@ namespace Content.Client.Disposal.UI
} }
}, },
new Control {MinSize = (0, 5)}, new Control {MinSize = (0, 5)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 4, SeparationOverride = 4,
Children = Children =
{ {
@@ -59,8 +63,9 @@ namespace Content.Client.Disposal.UI
} }
}, },
new Control {MinSize = (0, 10)}, new Control {MinSize = (0, 10)},
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(Engage = new Button (Engage = new Button

View File

@@ -4,11 +4,11 @@
Title="{Loc 'ui-escape-title'}" Title="{Loc 'ui-escape-title'}"
Resizable="False"> Resizable="False">
<VBoxContainer SeparationOverride="4" CustomMinimumSize="150 160"> <BoxContainer Orientation="Vertical" SeparationOverride="4" CustomMinimumSize="150 160">
<changelog:ChangelogButton /> <changelog:ChangelogButton />
<ui:VoteCallMenuButton /> <ui:VoteCallMenuButton />
<Button Name="OptionsButton" Text="{Loc 'ui-escape-options'}" /> <Button Name="OptionsButton" Text="{Loc 'ui-escape-options'}" />
<Button Name="DisconnectButton" Text="{Loc 'ui-escape-disconnect'}" /> <Button Name="DisconnectButton" Text="{Loc 'ui-escape-disconnect'}" />
<Button Name="QuitButton" Text="{Loc 'ui-escape-quit'}" /> <Button Name="QuitButton" Text="{Loc 'ui-escape-quit'}" />
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -9,6 +9,7 @@ using Robust.Shared;
using Robust.Shared.Configuration; using Robust.Shared.Configuration;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.EscapeMenu.UI namespace Content.Client.EscapeMenu.UI
{ {
@@ -31,10 +32,14 @@ namespace Content.Client.EscapeMenu.UI
_cfg = cfg; _cfg = cfg;
_clydeAudio = clydeAudio; _clydeAudio = clydeAudio;
var vBox = new VBoxContainer(); var vBox = new BoxContainer
var contents = new VBoxContainer
{ {
Orientation = LayoutOrientation.Vertical
};
var contents = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(2, 2, 2, 0), Margin = new Thickness(2, 2, 2, 0),
VerticalExpand = true, VerticalExpand = true,
}; };
@@ -54,8 +59,9 @@ namespace Content.Client.EscapeMenu.UI
Align = Label.AlignMode.Right Align = Label.AlignMode.Right
}; };
contents.AddChild(new HBoxContainer contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Control {MinSize = (4, 0)}, new Control {MinSize = (4, 0)},
@@ -106,9 +112,10 @@ namespace Content.Client.EscapeMenu.UI
HasMargins = false, HasMargins = false,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Align = BoxContainer.AlignMode.End, Orientation = LayoutOrientation.Horizontal,
Align = AlignMode.End,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
Children = Children =

View File

@@ -10,6 +10,7 @@ using Robust.Shared.Configuration;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.EscapeMenu.UI namespace Content.Client.EscapeMenu.UI
{ {
@@ -47,10 +48,14 @@ namespace Content.Client.EscapeMenu.UI
{ {
_cfg = cfg; _cfg = cfg;
_prototypeManager = proMan; _prototypeManager = proMan;
var vBox = new VBoxContainer(); var vBox = new BoxContainer
var contents = new VBoxContainer
{ {
Orientation = LayoutOrientation.Vertical
};
var contents = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(2, 2, 2, 0), Margin = new Thickness(2, 2, 2, 0),
VerticalExpand = true, VerticalExpand = true,
}; };
@@ -70,8 +75,9 @@ namespace Content.Client.EscapeMenu.UI
LightingPresetOption.AddItem(Loc.GetString("ui-options-lighting-high")); LightingPresetOption.AddItem(Loc.GetString("ui-options-lighting-high"));
LightingPresetOption.OnItemSelected += OnLightingQualityChanged; LightingPresetOption.OnItemSelected += OnLightingQualityChanged;
contents.AddChild(new HBoxContainer contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("ui-options-lighting-label")}, new Label {Text = Loc.GetString("ui-options-lighting-label")},
@@ -97,8 +103,9 @@ namespace Content.Client.EscapeMenu.UI
_uiScaleOption.AddItem(Loc.GetString("ui-options-scale-200")); _uiScaleOption.AddItem(Loc.GetString("ui-options-scale-200"));
_uiScaleOption.OnItemSelected += OnUIScaleChanged; _uiScaleOption.OnItemSelected += OnUIScaleChanged;
contents.AddChild(new HBoxContainer contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("ui-options-scale-label")}, new Label {Text = Loc.GetString("ui-options-scale-label")},
@@ -114,8 +121,9 @@ namespace Content.Client.EscapeMenu.UI
} }
_hudThemeOption.OnItemSelected += OnHudThemeChanged; _hudThemeOption.OnItemSelected += OnHudThemeChanged;
contents.AddChild(new HBoxContainer contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label {Text = Loc.GetString("ui-options-hud-theme")}, new Label {Text = Loc.GetString("ui-options-hud-theme")},
@@ -152,13 +160,15 @@ namespace Content.Client.EscapeMenu.UI
_viewportLowResCheckBox = new CheckBox { Text = Loc.GetString("ui-options-vp-low-res")}; _viewportLowResCheckBox = new CheckBox { Text = Loc.GetString("ui-options-vp-low-res")};
_viewportLowResCheckBox.OnToggled += OnCheckBoxToggled; _viewportLowResCheckBox.OnToggled += OnCheckBoxToggled;
contents.AddChild(new HBoxContainer contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
_viewportStretchCheckBox, _viewportStretchCheckBox,
(_viewportScaleBox = new HBoxContainer (_viewportScaleBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(_viewportScaleText = new Label (_viewportScaleText = new Label

View File

@@ -12,6 +12,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.EscapeMenu.UI namespace Content.Client.EscapeMenu.UI
{ {
@@ -40,9 +41,14 @@ namespace Content.Client.EscapeMenu.UI
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
Button resetAllButton; Button resetAllButton;
var vBox = new VBoxContainer {Margin = new Thickness(2, 0, 0, 0)}; var vBox = new BoxContainer
AddChild(new VBoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(2, 0, 0, 0)
};
AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new ScrollContainer new ScrollContainer
@@ -57,8 +63,9 @@ namespace Content.Client.EscapeMenu.UI
HasMargins = false, HasMargins = false,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Control {MinSize = (2, 0)}, new Control {MinSize = (2, 0)},
@@ -413,8 +420,9 @@ namespace Content.Client.EscapeMenu.UI
BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft); BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft);
ResetButton = new Button {Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = {StyleBase.ButtonCaution}}; ResetButton = new Button {Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = {StyleBase.ButtonCaution}};
var hBox = new HBoxContainer var hBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Control {MinSize = (5, 0)}, new Control {MinSize = (5, 0)},

View File

@@ -15,6 +15,7 @@ using Robust.Shared.Map;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Players; using Robust.Shared.Players;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Examine namespace Content.Client.Examine
{ {
@@ -77,9 +78,16 @@ namespace Content.Client.Examine
panel.ModulateSelfOverride = Color.LightGray.WithAlpha(0.90f); panel.ModulateSelfOverride = Color.LightGray.WithAlpha(0.90f);
_examineTooltipOpen.AddChild(panel); _examineTooltipOpen.AddChild(panel);
//panel.SetAnchorAndMarginPreset(Control.LayoutPreset.Wide); //panel.SetAnchorAndMarginPreset(Control.LayoutPreset.Wide);
var vBox = new VBoxContainer(); var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
panel.AddChild(vBox); panel.AddChild(vBox);
var hBox = new HBoxContainer {SeparationOverride = 5}; var hBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 5
};
vBox.AddChild(hBox); vBox.AddChild(hBox);
if (entity.TryGetComponent(out ISpriteComponent? sprite)) if (entity.TryGetComponent(out ISpriteComponent? sprite))
{ {

View File

@@ -7,6 +7,7 @@ using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Ghost namespace Content.Client.Ghost
{ {
@@ -43,8 +44,9 @@ namespace Content.Client.Ghost
_ghostRoles.OnPressed += _ => IoCManager.Resolve<IClientConsoleHost>() _ghostRoles.OnPressed += _ => IoCManager.Resolve<IClientConsoleHost>()
.RemoteExecuteCommand(null, "ghostroles"); .RemoteExecuteCommand(null, "ghostroles");
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
_returnToBody, _returnToBody,
@@ -76,7 +78,7 @@ namespace Content.Client.Ghost
private readonly GhostComponent _owner; private readonly GhostComponent _owner;
private readonly IEntityNetworkManager _netManager; private readonly IEntityNetworkManager _netManager;
private readonly VBoxContainer _buttonContainer; private readonly BoxContainer _buttonContainer;
public List<string> Locations { get; set; } = new(); public List<string> Locations { get; set; } = new();
@@ -89,8 +91,9 @@ namespace Content.Client.Ghost
_owner = owner; _owner = owner;
_netManager = netManager; _netManager = netManager;
_buttonContainer = new VBoxContainer() _buttonContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
SeparationOverride = 5, SeparationOverride = 5,

View File

@@ -1,9 +1,9 @@
<VBoxContainer <BoxContainer Orientation="Vertical"
xmlns="https://spacestation14.io"> xmlns="https://spacestation14.io">
<RichTextLabel Name="Title" /> <RichTextLabel Name="Title" />
<HBoxContainer SeparationOverride="10"> <BoxContainer Orientation="Horizontal" SeparationOverride="10">
<RichTextLabel Name="Description" HorizontalExpand="True" /> <RichTextLabel Name="Description" HorizontalExpand="True" />
<Button Name="RequestButton" Text="Request" TextAlign="Center" SizeFlagsHorizontal="ShrinkEnd" /> <Button Name="RequestButton" Text="Request" TextAlign="Center" SizeFlagsHorizontal="ShrinkEnd" />
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>

View File

@@ -4,7 +4,7 @@
<Label Text="There are currently no available ghost roles." /> <Label Text="There are currently no available ghost roles." />
</CenterContainer> </CenterContainer>
<ScrollContainer HorizontalExpand="True" VerticalExpand="True"> <ScrollContainer HorizontalExpand="True" VerticalExpand="True">
<VBoxContainer Name="EntryContainer" HorizontalExpand="True" VerticalExpand="True" /> <BoxContainer Orientation="Vertical" Name="EntryContainer" HorizontalExpand="True" VerticalExpand="True" />
</ScrollContainer> </ScrollContainer>
</SS14Window> </SS14Window>

View File

@@ -1,26 +1,26 @@
<SS14Window Title="Make Ghost Role" <SS14Window Title="Make Ghost Role"
xmlns="https://spacestation14.io"> xmlns="https://spacestation14.io">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Name="RoleEntityLabel" Text="Entity" /> <Label Name="RoleEntityLabel" Text="Entity" />
<Label Name="RoleEntity" Text="" /> <Label Name="RoleEntity" Text="" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Name="RoleNameLabel" Text="Role Name" /> <Label Name="RoleNameLabel" Text="Role Name" />
<LineEdit Name="RoleName" HorizontalExpand="True" /> <LineEdit Name="RoleName" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Name="RoleDescriptionLabel" Text="Role Description" /> <Label Name="RoleDescriptionLabel" Text="Role Description" />
<LineEdit Name="RoleDescription" HorizontalExpand="True" /> <LineEdit Name="RoleDescription" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Name="MakeSentientLabel" Text="Make Sentient" /> <Label Name="MakeSentientLabel" Text="Make Sentient" />
<CheckBox Name="MakeSentientCheckbox" /> <CheckBox Name="MakeSentientCheckbox" />
</HBoxContainer> </BoxContainer>
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Button Name="MakeButton" Text="Make" /> <Button Name="MakeButton" Text="Make" />
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -7,6 +7,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Gravity namespace Content.Client.Gravity
{ {
@@ -73,8 +74,9 @@ namespace Content.Client.Gravity
Title = Loc.GetString("gravity-generator-window-title"); Title = Loc.GetString("gravity-generator-window-title");
var vBox = new VBoxContainer var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
MinSize = new Vector2(250, 100) MinSize = new Vector2(250, 100)
}; };
Status = new Label Status = new Label

View File

@@ -25,6 +25,7 @@ using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.Input.Keyboard.Key; using static Robust.Client.Input.Keyboard.Key;
using static Robust.Client.UserInterface.Controls.BoxContainer;
using Control = Robust.Client.UserInterface.Control; using Control = Robust.Client.UserInterface.Control;
using LC = Robust.Client.UserInterface.Controls.LayoutContainer; using LC = Robust.Client.UserInterface.Controls.LayoutContainer;
@@ -94,7 +95,7 @@ namespace Content.Client.HUD
internal sealed class GameHud : IGameHud internal sealed class GameHud : IGameHud
{ {
private HBoxContainer _topButtonsContainer = default!; private BoxContainer _topButtonsContainer = default!;
private TopButton _buttonEscapeMenu = default!; private TopButton _buttonEscapeMenu = default!;
private TopButton _buttonInfo = default!; private TopButton _buttonInfo = default!;
private TopButton _buttonCharacterMenu = default!; private TopButton _buttonCharacterMenu = default!;
@@ -105,8 +106,8 @@ namespace Content.Client.HUD
private TopButton _buttonSandboxMenu = default!; private TopButton _buttonSandboxMenu = default!;
private InfoWindow _infoWindow = default!; private InfoWindow _infoWindow = default!;
private TargetingDoll _targetingDoll = default!; private TargetingDoll _targetingDoll = default!;
private VBoxContainer _combatPanelContainer = default!; private BoxContainer _combatPanelContainer = default!;
private VBoxContainer _topNotificationContainer = default!; private BoxContainer _topNotificationContainer = default!;
[Dependency] private readonly IResourceCache _resourceCache = default!; [Dependency] private readonly IResourceCache _resourceCache = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
@@ -183,8 +184,9 @@ namespace Content.Client.HUD
var infoTexture = _resourceCache.GetTexture("/Textures/Interface/info.svg.192dpi.png"); var infoTexture = _resourceCache.GetTexture("/Textures/Interface/info.svg.192dpi.png");
var sandboxTexture = _resourceCache.GetTexture("/Textures/Interface/sandbox.svg.192dpi.png"); var sandboxTexture = _resourceCache.GetTexture("/Textures/Interface/sandbox.svg.192dpi.png");
_topButtonsContainer = new HBoxContainer _topButtonsContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 8 SeparationOverride = 8
}; };
@@ -307,8 +309,9 @@ namespace Content.Client.HUD
InputCmdHandler.FromDelegate(s => ButtonInfoOnOnToggled())); InputCmdHandler.FromDelegate(s => ButtonInfoOnOnToggled()));
_combatPanelContainer = new VBoxContainer _combatPanelContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalAlignment = Control.HAlignment.Left, HorizontalAlignment = Control.HAlignment.Left,
VerticalAlignment = Control.VAlignment.Bottom, VerticalAlignment = Control.VAlignment.Bottom,
Children = Children =
@@ -324,8 +327,9 @@ namespace Content.Client.HUD
_targetingDoll.OnZoneChanged += args => OnTargetingZoneChanged?.Invoke(args); _targetingDoll.OnZoneChanged += args => OnTargetingZoneChanged?.Invoke(args);
var centerBottomContainer = new VBoxContainer var centerBottomContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
SeparationOverride = 5, SeparationOverride = 5,
HorizontalAlignment = Control.HAlignment.Center HorizontalAlignment = Control.HAlignment.Center
}; };
@@ -340,24 +344,28 @@ namespace Content.Client.HUD
VerticalAlignment = Control.VAlignment.Bottom, VerticalAlignment = Control.VAlignment.Bottom,
HorizontalAlignment = Control.HAlignment.Center HorizontalAlignment = Control.HAlignment.Center
}; };
BottomRightInventoryQuickButtonContainer = new HBoxContainer() BottomRightInventoryQuickButtonContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalAlignment = Control.VAlignment.Bottom, VerticalAlignment = Control.VAlignment.Bottom,
HorizontalAlignment = Control.HAlignment.Right HorizontalAlignment = Control.HAlignment.Right
}; };
BottomLeftInventoryQuickButtonContainer = new HBoxContainer() BottomLeftInventoryQuickButtonContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalAlignment = Control.VAlignment.Bottom, VerticalAlignment = Control.VAlignment.Bottom,
HorizontalAlignment = Control.HAlignment.Left HorizontalAlignment = Control.HAlignment.Left
}; };
TopInventoryQuickButtonContainer = new HBoxContainer() TopInventoryQuickButtonContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Visible = false, Visible = false,
VerticalAlignment = Control.VAlignment.Bottom, VerticalAlignment = Control.VAlignment.Bottom,
HorizontalAlignment = Control.HAlignment.Center HorizontalAlignment = Control.HAlignment.Center
}; };
var bottomRow = new HBoxContainer() var bottomRow = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalAlignment = Control.HAlignment.Center HorizontalAlignment = Control.HAlignment.Center
}; };
@@ -376,8 +384,9 @@ namespace Content.Client.HUD
HorizontalAlignment = Control.HAlignment.Center HorizontalAlignment = Control.HAlignment.Center
}; };
var rightBottomContainer = new HBoxContainer var rightBottomContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 5 SeparationOverride = 5
}; };
LC.SetAnchorAndMarginPreset(rightBottomContainer, LC.LayoutPreset.BottomRight); LC.SetAnchorAndMarginPreset(rightBottomContainer, LC.LayoutPreset.BottomRight);
@@ -396,8 +405,9 @@ namespace Content.Client.HUD
LC.SetGrowHorizontal(SuspicionContainer, LC.GrowDirection.End); LC.SetGrowHorizontal(SuspicionContainer, LC.GrowDirection.End);
LC.SetGrowVertical(SuspicionContainer, LC.GrowDirection.Begin); LC.SetGrowVertical(SuspicionContainer, LC.GrowDirection.Begin);
_topNotificationContainer = new VBoxContainer _topNotificationContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
MinSize = (600, 0) MinSize = (600, 0)
}; };
RootControl.AddChild(_topNotificationContainer); RootControl.AddChild(_topNotificationContainer);
@@ -405,7 +415,10 @@ namespace Content.Client.HUD
LC.SetGrowHorizontal(_topNotificationContainer, LC.GrowDirection.Both); LC.SetGrowHorizontal(_topNotificationContainer, LC.GrowDirection.Both);
LC.SetGrowVertical(_topNotificationContainer, LC.GrowDirection.End); LC.SetGrowVertical(_topNotificationContainer, LC.GrowDirection.End);
VoteContainer = new VBoxContainer(); VoteContainer = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
RootControl.AddChild(VoteContainer); RootControl.AddChild(VoteContainer);
LC.SetAnchorPreset(VoteContainer, LC.LayoutPreset.TopLeft); LC.SetAnchorPreset(VoteContainer, LC.LayoutPreset.TopLeft);
LC.SetMarginLeft(VoteContainer, 180); LC.SetMarginLeft(VoteContainer, 180);
@@ -564,8 +577,9 @@ namespace Content.Client.HUD
TooltipDelay = CustomTooltipDelay; TooltipDelay = CustomTooltipDelay;
AddChild( AddChild(
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(_textureRect = new TextureRect (_textureRect = new TextureRect

View File

@@ -21,6 +21,7 @@ using Robust.Shared.Input;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Hands namespace Content.Client.Hands
{ {
@@ -36,7 +37,7 @@ namespace Content.Client.Hands
private ItemStatusPanel StatusPanel { get; } private ItemStatusPanel StatusPanel { get; }
private HBoxContainer HandsContainer { get; } private BoxContainer HandsContainer { get; }
[ViewVariables] [ViewVariables]
public IReadOnlyList<GuiHand> Hands => _hands; public IReadOnlyList<GuiHand> Hands => _hands;
@@ -53,18 +54,24 @@ namespace Content.Client.Hands
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
_configManager.OnValueChanged(CCVars.HudTheme, UpdateHudTheme); _configManager.OnValueChanged(CCVars.HudTheme, UpdateHudTheme);
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 0, SeparationOverride = 0,
HorizontalAlignment = HAlignment.Center, HorizontalAlignment = HAlignment.Center,
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(StatusPanel = ItemStatusPanel.FromSide(HandLocation.Middle)), (StatusPanel = ItemStatusPanel.FromSide(HandLocation.Middle)),
(HandsContainer = new HBoxContainer() { HorizontalAlignment = HAlignment.Center } ), (HandsContainer = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
HorizontalAlignment = HAlignment.Center
}),
} }
}, },
} }

View File

@@ -11,6 +11,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Info namespace Content.Client.Info
{ {
@@ -56,8 +57,9 @@ namespace Content.Client.Info
private void PopulateRules(Control rulesList) private void PopulateRules(Control rulesList)
{ {
var vBox = new VBoxContainer var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(2, 2, 0, 0) Margin = new Thickness(2, 2, 0, 0)
}; };
@@ -97,8 +99,9 @@ namespace Content.Client.Info
{ {
Button controlsButton; Button controlsButton;
var vBox = new VBoxContainer var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(2, 2, 0, 0) Margin = new Thickness(2, 2, 0, 0)
}; };
@@ -130,8 +133,9 @@ namespace Content.Client.Info
AddSection(Loc.GetString("ui-info-header-intro"), "Intro.txt"); AddSection(Loc.GetString("ui-info-header-intro"), "Intro.txt");
vBox.AddChild(new HBoxContainer vBox.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
MinSize = (0, 10), MinSize = (0, 10),
Children = Children =
{ {
@@ -139,8 +143,9 @@ namespace Content.Client.Info
} }
}); });
vBox.AddChild(new HBoxContainer vBox.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 5, SeparationOverride = 5,
Children = Children =
{ {

View File

@@ -21,7 +21,10 @@ namespace Content.Client.Info
}; };
AddChild(_richTextLabel); AddChild(_richTextLabel);
var buttons = new HBoxContainer(); var buttons = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
AddChild(buttons); AddChild(buttons);
var uriOpener = IoCManager.Resolve<IUriOpener>(); var uriOpener = IoCManager.Resolve<IUriOpener>();

View File

@@ -1,26 +1,26 @@
<SS14Window xmlns="https://spacestation14.io" <SS14Window xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"> xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client">
<VBoxContainer SeparationOverride="5"> <BoxContainer Orientation="Vertical" SeparationOverride="5">
<HBoxContainer VerticalExpand="True"> <BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Button Name="InputButton" ToggleMode="True" Text="MIDI Input" TextAlign="Center" <Button Name="InputButton" ToggleMode="True" Text="MIDI Input" TextAlign="Center"
HorizontalExpand="True" SizeFlagsStretchRatio="1" /> HorizontalExpand="True" SizeFlagsStretchRatio="1" />
<Control HorizontalExpand="True" SizeFlagsStretchRatio="2" /> <Control HorizontalExpand="True" SizeFlagsStretchRatio="2" />
<Button Name="FileButton" Text="Play MIDI File" TextAlign="Center" HorizontalExpand="True" <Button Name="FileButton" Text="Play MIDI File" TextAlign="Center" HorizontalExpand="True"
SizeFlagsStretchRatio="1" /> SizeFlagsStretchRatio="1" />
</HBoxContainer> </BoxContainer>
<HBoxContainer VerticalExpand="True"> <BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Button Name="LoopButton" ToggleMode="True" Text="Loop" TextAlign="Center" HorizontalExpand="True" <Button Name="LoopButton" ToggleMode="True" Text="Loop" TextAlign="Center" HorizontalExpand="True"
SizeFlagsStretchRatio="1" /> SizeFlagsStretchRatio="1" />
<Control HorizontalExpand="True" SizeFlagsStretchRatio="2" /> <Control HorizontalExpand="True" SizeFlagsStretchRatio="2" />
<Button Name="StopButton" Text="Stop" TextAlign="Center" HorizontalExpand="True" <Button Name="StopButton" Text="Stop" TextAlign="Center" HorizontalExpand="True"
SizeFlagsStretchRatio="1" /> SizeFlagsStretchRatio="1" />
</HBoxContainer> </BoxContainer>
<HBoxContainer VerticalExpand="True"> <BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Control HorizontalExpand="True" SizeFlagsStretchRatio="0.125" /> <Control HorizontalExpand="True" SizeFlagsStretchRatio="0.125" />
<Slider Name="PlaybackSlider" HorizontalExpand="True" /> <Slider Name="PlaybackSlider" HorizontalExpand="True" />
<Control HorizontalExpand="True" SizeFlagsStretchRatio="0.125" /> <Control HorizontalExpand="True" SizeFlagsStretchRatio="0.125" />
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
<PanelContainer Name="UnavailableOverlay" Visible="False" MouseFilter="Stop"> <PanelContainer Name="UnavailableOverlay" Visible="False" MouseFilter="Stop">
<PanelContainer.PanelOverride> <PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#000000E5" /> <gfx:StyleBoxFlat BackgroundColor="#000000E5" />

View File

@@ -17,6 +17,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Content.Shared.Inventory.EquipmentSlotDefines; using static Content.Shared.Inventory.EquipmentSlotDefines;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Inventory namespace Content.Client.Inventory
{ {
@@ -102,8 +103,9 @@ namespace Content.Client.Inventory
AddButton(out _hudButtonEars, Slots.EARS, "ears"); AddButton(out _hudButtonEars, Slots.EARS, "ears");
AddButton(out _hudButtonHead, Slots.HEAD, "head"); AddButton(out _hudButtonHead, Slots.HEAD, "head");
_topQuickButtonsContainer = new HBoxContainer _topQuickButtonsContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
_hudButtonShoes, _hudButtonShoes,
@@ -119,8 +121,9 @@ namespace Content.Client.Inventory
SeparationOverride = 5 SeparationOverride = 5
}; };
_bottomRightQuickButtonsContainer = new HBoxContainer _bottomRightQuickButtonsContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
_hudButtonPocket1, _hudButtonPocket1,
@@ -129,8 +132,9 @@ namespace Content.Client.Inventory
}, },
SeparationOverride = 5 SeparationOverride = 5
}; };
_bottomLeftQuickButtonsContainer = new HBoxContainer _bottomLeftQuickButtonsContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
_hudButtonBelt, _hudButtonBelt,

View File

@@ -12,6 +12,7 @@ using Robust.Shared.Maths;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Content.Client.IoC.StaticIoC; using static Content.Client.IoC.StaticIoC;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Items.UI namespace Content.Client.Items.UI
{ {
@@ -23,7 +24,7 @@ namespace Content.Client.Items.UI
[ViewVariables] [ViewVariables]
private readonly Label _itemNameLabel; private readonly Label _itemNameLabel;
[ViewVariables] [ViewVariables]
private readonly VBoxContainer _statusContents; private readonly BoxContainer _statusContents;
[ViewVariables] [ViewVariables]
private readonly PanelContainer _panel; private readonly PanelContainer _panel;
@@ -47,12 +48,16 @@ namespace Content.Client.Items.UI
ModulateSelfOverride = Color.White.WithAlpha(0.9f), ModulateSelfOverride = Color.White.WithAlpha(0.9f),
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
SeparationOverride = 0, SeparationOverride = 0,
Children = Children =
{ {
(_statusContents = new VBoxContainer()), (_statusContents = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
}),
(_itemNameLabel = new Label (_itemNameLabel = new Label
{ {
ClipText = true, ClipText = true,

View File

@@ -15,6 +15,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BaseButton; using static Robust.Client.UserInterface.Controls.BaseButton;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Kitchen.UI namespace Content.Client.Kitchen.UI
{ {
@@ -165,9 +166,9 @@ namespace Content.Client.Kitchen.UI
public ButtonGroup CookTimeButtonGroup { get; } public ButtonGroup CookTimeButtonGroup { get; }
public VBoxContainer CookTimeButtonVbox { get; } public BoxContainer CookTimeButtonVbox { get; }
private VBoxContainer ButtonGridContainer { get; } private BoxContainer ButtonGridContainer { get; }
private PanelContainer DisableCookingPanelOverlay { get; } private PanelContainer DisableCookingPanelOverlay { get; }
@@ -188,7 +189,10 @@ namespace Content.Client.Kitchen.UI
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.Black.WithAlpha(0.60f)}, PanelOverride = new StyleBoxFlat {BackgroundColor = Color.Black.WithAlpha(0.60f)},
}; };
var hSplit = new HBoxContainer(); var hSplit = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
IngredientsListReagents = new ItemList IngredientsListReagents = new ItemList
{ {
@@ -217,17 +221,19 @@ namespace Content.Client.Kitchen.UI
hSplit.AddChild(IngredientsList); hSplit.AddChild(IngredientsList);
var vSplit = new VBoxContainer var vSplit = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
HorizontalExpand = true, HorizontalExpand = true,
}; };
hSplit.AddChild(vSplit); hSplit.AddChild(vSplit);
ButtonGridContainer = new VBoxContainer ButtonGridContainer = new BoxContainer
{ {
Align = BoxContainer.AlignMode.Center, Orientation = LayoutOrientation.Vertical,
Align = AlignMode.Center,
SizeFlagsStretchRatio = 3 SizeFlagsStretchRatio = 3
}; };
@@ -255,10 +261,11 @@ namespace Content.Client.Kitchen.UI
}); });
CookTimeButtonGroup = new ButtonGroup(); CookTimeButtonGroup = new ButtonGroup();
CookTimeButtonVbox = new VBoxContainer CookTimeButtonVbox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
Align = BoxContainer.AlignMode.Center, Align = AlignMode.Center,
}; };
var index = 0; var index = 0;
@@ -301,8 +308,9 @@ namespace Content.Client.Kitchen.UI
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new PanelContainer new PanelContainer

View File

@@ -11,6 +11,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Content.Shared.Chemistry.Solution.Solution; using static Content.Shared.Chemistry.Solution.Solution;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Kitchen.UI namespace Content.Client.Kitchen.UI
{ {
@@ -238,10 +239,14 @@ namespace Content.Client.Kitchen.UI
Owner = owner; Owner = owner;
Title = Loc.GetString("grinder-menu-title"); Title = Loc.GetString("grinder-menu-title");
var hSplit = new HBoxContainer(); var hSplit = new BoxContainer
var vBoxGrindJuiceButtonPanel = new VBoxContainer
{ {
Orientation = LayoutOrientation.Horizontal
};
var vBoxGrindJuiceButtonPanel = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
VerticalAlignment = VAlignment.Center VerticalAlignment = VAlignment.Center
}; };

View File

@@ -16,6 +16,7 @@ using Robust.Shared.Log;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.LateJoin namespace Content.Client.LateJoin
{ {
@@ -27,7 +28,7 @@ namespace Content.Client.LateJoin
public event Action<string>? SelectedId; public event Action<string>? SelectedId;
private readonly Dictionary<string, JobButton> _jobButtons = new(); private readonly Dictionary<string, JobButton> _jobButtons = new();
private readonly Dictionary<string, VBoxContainer> _jobCategories = new(); private readonly Dictionary<string, BoxContainer> _jobCategories = new();
public LateJoinGui() public LateJoinGui()
{ {
@@ -38,9 +39,13 @@ namespace Content.Client.LateJoin
Title = Loc.GetString("late-join-gui-title"); Title = Loc.GetString("late-join-gui-title");
var jobList = new VBoxContainer(); var jobList = new BoxContainer
var vBox = new VBoxContainer
{ {
Orientation = LayoutOrientation.Vertical
};
var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new ScrollContainer new ScrollContainer
@@ -64,8 +69,9 @@ namespace Content.Client.LateJoin
{ {
if (!_jobCategories.TryGetValue(department, out var category)) if (!_jobCategories.TryGetValue(department, out var category))
{ {
category = new VBoxContainer category = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Name = department, Name = department,
ToolTip = Loc.GetString("late-join-gui-jobs-amount-in-department-tooltip", ToolTip = Loc.GetString("late-join-gui-jobs-amount-in-department-tooltip",
("departmentName", department)) ("departmentName", department))
@@ -101,8 +107,9 @@ namespace Content.Client.LateJoin
var jobButton = new JobButton(job.ID); var jobButton = new JobButton(job.ID);
var jobSelector = new HBoxContainer var jobSelector = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true HorizontalExpand = true
}; };

View File

@@ -8,6 +8,7 @@ using Robust.Client.UserInterface.CustomControls;
using Robust.Client.Utility; using Robust.Client.Utility;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Lathe.UI namespace Content.Client.Lathe.UI
{ {
@@ -36,14 +37,16 @@ namespace Content.Client.Lathe.UI
Title = "Lathe Menu"; Title = "Lathe Menu";
var vBox = new VBoxContainer() var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
SeparationOverride = 5, SeparationOverride = 5,
}; };
var hBoxButtons = new HBoxContainer() var hBoxButtons = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 1, SizeFlagsStretchRatio = 1,
@@ -76,8 +79,9 @@ namespace Content.Client.Lathe.UI
SizeFlagsStretchRatio = 3, SizeFlagsStretchRatio = 3,
}; };
var hBoxFilter = new HBoxContainer() var hBoxFilter = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 1 SizeFlagsStretchRatio = 1

View File

@@ -5,6 +5,7 @@ using Robust.Client.UserInterface.CustomControls;
using Robust.Client.Utility; using Robust.Client.Utility;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Lathe.UI namespace Content.Client.Lathe.UI
{ {
@@ -24,10 +25,14 @@ namespace Content.Client.Lathe.UI
SetSize = MinSize = (300, 450); SetSize = MinSize = (300, 450);
Title = Loc.GetString("lathequeue-menu-title"); Title = Loc.GetString("lathequeue-menu-title");
var vBox = new VBoxContainer(); var vBox = new BoxContainer
var hBox = new HBoxContainer()
{ {
Orientation = LayoutOrientation.Vertical
};
var hBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
SizeFlagsStretchRatio = 2, SizeFlagsStretchRatio = 2,
}; };
@@ -38,8 +43,9 @@ namespace Content.Client.Lathe.UI
SizeFlagsStretchRatio = 2, SizeFlagsStretchRatio = 2,
}; };
var vBoxInfo = new VBoxContainer() var vBoxInfo = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 3, SizeFlagsStretchRatio = 3,
}; };

View File

@@ -6,48 +6,48 @@
<parallax:ParallaxControl /> <parallax:ParallaxControl />
<Control HorizontalAlignment="Center" VerticalAlignment="Center"> <Control HorizontalAlignment="Center" VerticalAlignment="Center">
<PanelContainer StyleClasses="AngleRect" /> <PanelContainer StyleClasses="AngleRect" />
<VBoxContainer MinSize="300 200"> <BoxContainer Orientation="Vertical" MinSize="300 200">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}" <Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}"
StyleClasses="LabelHeading" VAlign="Center" /> StyleClasses="LabelHeading" VAlign="Center" />
<Button Name="ExitButton" Text="{Loc 'connecting-exit'}" <Button Name="ExitButton" Text="{Loc 'connecting-exit'}"
HorizontalAlignment="Right" HorizontalExpand="True" /> HorizontalAlignment="Right" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
<ui:HighDivider /> <ui:HighDivider />
<VBoxContainer VerticalExpand="True" Margin="4 4 4 0"> <BoxContainer Orientation="Vertical" VerticalExpand="True" Margin="4 4 4 0">
<Control VerticalExpand="True" Margin="0 0 0 8"> <Control VerticalExpand="True" Margin="0 0 0 8">
<VBoxContainer Name="ConnectingStatus"> <BoxContainer Orientation="Vertical" Name="ConnectingStatus">
<Label Text="{Loc 'connecting-in-progress'}" Align="Center" /> <Label Text="{Loc 'connecting-in-progress'}" Align="Center" />
<!-- Who the fuck named these cont- oh wait I did --> <!-- Who the fuck named these cont- oh wait I did -->
<Label Name="ConnectStatus" StyleClasses="LabelSubText" Align="Center" /> <Label Name="ConnectStatus" StyleClasses="LabelSubText" Align="Center" />
</VBoxContainer> </BoxContainer>
<VBoxContainer Name="ConnectFail" Visible="False"> <BoxContainer Orientation="Vertical" Name="ConnectFail" Visible="False">
<Label Name="ConnectFailReason" Align="Center" /> <Label Name="ConnectFailReason" Align="Center" />
<Button Name="RetryButton" Text="{Loc 'connecting-retry'}" <Button Name="RetryButton" Text="{Loc 'connecting-retry'}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" /> VerticalExpand="True" VerticalAlignment="Bottom" />
</VBoxContainer> </BoxContainer>
<VBoxContainer Name="Disconnected"> <BoxContainer Orientation="Vertical" Name="Disconnected">
<Label Text="{Loc 'connecting-disconnected'}" Align="Center" /> <Label Text="{Loc 'connecting-disconnected'}" Align="Center" />
<Label Name="DisconnectReason" Align="Center" /> <Label Name="DisconnectReason" Align="Center" />
<Button Name="ReconnectButton" Text="{Loc 'connecting-reconnect'}" <Button Name="ReconnectButton" Text="{Loc 'connecting-reconnect'}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" /> VerticalExpand="True" VerticalAlignment="Bottom" />
</VBoxContainer> </BoxContainer>
</Control> </Control>
<Label Name="ConnectingAddress" StyleClasses="LabelSubText" HorizontalAlignment="Center" /> <Label Name="ConnectingAddress" StyleClasses="LabelSubText" HorizontalAlignment="Center" />
</VBoxContainer> </BoxContainer>
<PanelContainer> <PanelContainer>
<PanelContainer.PanelOverride> <PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#444" ContentMarginTopOverride="2" /> <gfx:StyleBoxFlat BackgroundColor="#444" ContentMarginTopOverride="2" />
</PanelContainer.PanelOverride> </PanelContainer.PanelOverride>
</PanelContainer> </PanelContainer>
<HBoxContainer Margin="12 0 4 0" VerticalAlignment="Bottom"> <BoxContainer Orientation="Horizontal" Margin="12 0 4 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'connecting-tip'}" StyleClasses="LabelSubText" /> <Label Text="{Loc 'connecting-tip'}" StyleClasses="LabelSubText" />
<Label Text="{Loc 'connecting-version'}" StyleClasses="LabelSubText" <Label Text="{Loc 'connecting-version'}" StyleClasses="LabelSubText"
HorizontalAlignment="Right" HorizontalExpand="True" /> HorizontalAlignment="Right" HorizontalExpand="True" />
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
</Control> </Control>
</Control> </Control>

View File

@@ -7,6 +7,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Light.Components namespace Content.Client.Light.Components
{ {
@@ -55,8 +56,9 @@ namespace Content.Client.Light.Components
{ {
_parent = parent; _parent = parent;
var wrapper = new HBoxContainer var wrapper = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 4, SeparationOverride = 4,
HorizontalAlignment = HAlignment.Center HorizontalAlignment = HAlignment.Center
}; };

View File

@@ -16,6 +16,7 @@ using Robust.Shared.Map;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Content.Shared.Inventory.EquipmentSlotDefines; using static Content.Shared.Inventory.EquipmentSlotDefines;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Lobby.UI namespace Content.Client.Lobby.UI
{ {
@@ -24,7 +25,7 @@ namespace Content.Client.Lobby.UI
private readonly IClientPreferencesManager _preferencesManager; private readonly IClientPreferencesManager _preferencesManager;
private IEntity _previewDummy; private IEntity _previewDummy;
private readonly Label _summaryLabel; private readonly Label _summaryLabel;
private readonly VBoxContainer _loaded; private readonly BoxContainer _loaded;
private readonly Label _unloaded; private readonly Label _unloaded;
public LobbyCharacterPreviewPanel(IEntityManager entityManager, public LobbyCharacterPreviewPanel(IEntityManager entityManager,
@@ -51,18 +52,28 @@ namespace Content.Client.Lobby.UI
var viewWest = MakeSpriteView(_previewDummy, Direction.West); var viewWest = MakeSpriteView(_previewDummy, Direction.West);
var viewEast = MakeSpriteView(_previewDummy, Direction.East); var viewEast = MakeSpriteView(_previewDummy, Direction.East);
var vBox = new VBoxContainer(); var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
vBox.AddChild(header); vBox.AddChild(header);
_unloaded = new Label {Text = Loc.GetString("lobby-character-preview-panel-unloaded-preferences-label")}; _unloaded = new Label {Text = Loc.GetString("lobby-character-preview-panel-unloaded-preferences-label")};
_loaded = new VBoxContainer {Visible = false}; _loaded = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Visible = false
};
_loaded.AddChild(CharacterSetupButton); _loaded.AddChild(CharacterSetupButton);
_loaded.AddChild(_summaryLabel); _loaded.AddChild(_summaryLabel);
var hBox = new HBoxContainer(); var hBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
hBox.AddChild(viewSouth); hBox.AddChild(viewSouth);
hBox.AddChild(viewNorth); hBox.AddChild(viewNorth);
hBox.AddChild(viewWest); hBox.AddChild(viewWest);

View File

@@ -18,9 +18,9 @@
<MarginContainer MarginBottomOverride="20" MarginLeftOverride="20" MarginRightOverride="20" <MarginContainer MarginBottomOverride="20" MarginLeftOverride="20" MarginRightOverride="20"
MarginTopOverride="20"> MarginTopOverride="20">
<PanelContainer StyleClasses="AngleRect" /> <PanelContainer StyleClasses="AngleRect" />
<VBoxContainer> <BoxContainer Orientation="Vertical">
<!-- Top row --> <!-- Top row -->
<HBoxContainer MinSize="0 40"> <BoxContainer Orientation="Horizontal" MinSize="0 40">
<MarginContainer MarginLeftOverride="8"> <MarginContainer MarginLeftOverride="8">
<Label StyleClasses="LabelHeadingBigger" VAlign="Center" Text="{Loc 'Lobby'}" /> <Label StyleClasses="LabelHeadingBigger" VAlign="Center" Text="{Loc 'Lobby'}" />
</MarginContainer> </MarginContainer>
@@ -28,7 +28,7 @@
<ui:VoteCallMenuButton Name="CCallVoteButton" StyleClasses="ButtonBig" /> <ui:VoteCallMenuButton Name="CCallVoteButton" StyleClasses="ButtonBig" />
<Button Name="COptionsButton" StyleClasses="ButtonBig" Text="{Loc 'Options'}" /> <Button Name="COptionsButton" StyleClasses="ButtonBig" Text="{Loc 'Options'}" />
<Button Name="CLeaveButton" StyleClasses="ButtonBig" Text="{Loc 'Leave'}" /> <Button Name="CLeaveButton" StyleClasses="ButtonBig" Text="{Loc 'Leave'}" />
</HBoxContainer> </BoxContainer>
<!-- Gold line --> <!-- Gold line -->
<PanelContainer> <PanelContainer>
<PanelContainer.PanelOverride> <PanelContainer.PanelOverride>
@@ -37,20 +37,20 @@
</PanelContainer.PanelOverride> </PanelContainer.PanelOverride>
</PanelContainer> </PanelContainer>
<!-- Middle section with the two vertical panels --> <!-- Middle section with the two vertical panels -->
<HBoxContainer VerticalExpand="True"> <BoxContainer Orientation="Horizontal" VerticalExpand="True">
<!-- Left panel --> <!-- Left panel -->
<VBoxContainer Name="CLeftPanelContainer" HorizontalExpand="True"> <BoxContainer Orientation="Vertical" Name="CLeftPanelContainer" HorizontalExpand="True">
<hudUi:StripeBack> <hudUi:StripeBack>
<MarginContainer MarginLeftOverride="3" MarginRightOverride="3" MarginBottomOverride="3" <MarginContainer MarginLeftOverride="3" MarginRightOverride="3" MarginBottomOverride="3"
MarginTopOverride="3"> MarginTopOverride="3">
<HBoxContainer SeparationOverride="6"> <BoxContainer Orientation="Horizontal" SeparationOverride="6">
<Button Name="CObserveButton" Text="{Loc 'Observe'}" StyleClasses="ButtonBig" /> <Button Name="CObserveButton" Text="{Loc 'Observe'}" StyleClasses="ButtonBig" />
<Label Name="CStartTime" Align="Right" <Label Name="CStartTime" Align="Right"
FontColorOverride="{x:Static maths:Color.DarkGray}" FontColorOverride="{x:Static maths:Color.DarkGray}"
StyleClasses="LabelBig" HorizontalExpand="True" /> StyleClasses="LabelBig" HorizontalExpand="True" />
<Button Name="CReadyButton" ToggleMode="True" Text="{Loc 'Ready Up'}" <Button Name="CReadyButton" ToggleMode="True" Text="{Loc 'Ready Up'}"
StyleClasses="ButtonBig" /> StyleClasses="ButtonBig" />
</HBoxContainer> </BoxContainer>
</MarginContainer> </MarginContainer>
</hudUi:StripeBack> </hudUi:StripeBack>
<MarginContainer VerticalExpand="True" MarginLeftOverride="3" MarginRightOverride="3" <MarginContainer VerticalExpand="True" MarginLeftOverride="3" MarginRightOverride="3"
@@ -58,7 +58,7 @@
MarginTopOverride="3"> MarginTopOverride="3">
<chatUi:ChatBox Name="CChat" /> <chatUi:ChatBox Name="CChat" />
</MarginContainer> </MarginContainer>
</VBoxContainer> </BoxContainer>
<!-- Gold line --> <!-- Gold line -->
<PanelContainer MinSize="2 0"> <PanelContainer MinSize="2 0">
<PanelContainer.PanelOverride> <PanelContainer.PanelOverride>
@@ -67,7 +67,7 @@
</PanelContainer> </PanelContainer>
<!-- Right panel --> <!-- Right panel -->
<Control HorizontalExpand="True"> <Control HorizontalExpand="True">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<!-- Player list --> <!-- Player list -->
<hudUi:NanoHeading Text="{Loc 'Online Players'}" /> <hudUi:NanoHeading Text="{Loc 'Online Players'}" />
<MarginContainer VerticalExpand="True" <MarginContainer VerticalExpand="True"
@@ -84,13 +84,13 @@
MarginBottomOverride="2" MarginTopOverride="3"> MarginBottomOverride="2" MarginTopOverride="3">
<info:ServerInfo Name="CServerInfo" /> <info:ServerInfo Name="CServerInfo" />
</MarginContainer> </MarginContainer>
</VBoxContainer> </BoxContainer>
<MarginContainer SizeFlagsHorizontal="ShrinkEnd" MarginTopOverride="8" MarginRightOverride="8"> <MarginContainer SizeFlagsHorizontal="ShrinkEnd" MarginTopOverride="8" MarginRightOverride="8">
<VBoxContainer Name="CVoteContainer" /> <BoxContainer Orientation="Vertical" Name="CVoteContainer" />
</MarginContainer> </MarginContainer>
</Control> </Control>
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
</MarginContainer> </MarginContainer>
</Control> </Control>

View File

@@ -8,6 +8,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML; using Robust.Client.UserInterface.XAML;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Lobby.UI namespace Content.Client.Lobby.UI
{ {
@@ -21,7 +22,7 @@ namespace Content.Client.Lobby.UI
public Button OptionsButton => COptionsButton; public Button OptionsButton => COptionsButton;
public Button LeaveButton => CLeaveButton; public Button LeaveButton => CLeaveButton;
public ChatBox Chat => CChat; public ChatBox Chat => CChat;
public VBoxContainer VoteContainer => CVoteContainer; public BoxContainer VoteContainer => CVoteContainer;
public LobbyPlayerList OnlinePlayerList => COnlinePlayerList; public LobbyPlayerList OnlinePlayerList => COnlinePlayerList;
public ServerInfo ServerInfo => CServerInfo; public ServerInfo ServerInfo => CServerInfo;
public LobbyCharacterPreviewPanel CharacterPreview { get; } public LobbyCharacterPreviewPanel CharacterPreview { get; }
@@ -49,7 +50,7 @@ namespace Content.Client.Lobby.UI
public class LobbyPlayerList : Control public class LobbyPlayerList : Control
{ {
private readonly ScrollContainer _scroll; private readonly ScrollContainer _scroll;
private readonly VBoxContainer _vBox; private readonly BoxContainer _vBox;
public LobbyPlayerList() public LobbyPlayerList()
{ {
@@ -57,7 +58,10 @@ namespace Content.Client.Lobby.UI
{ {
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#202028")}, PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#202028")},
}; };
_vBox = new VBoxContainer(); _vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
_scroll = new ScrollContainer(); _scroll = new ScrollContainer();
_scroll.AddChild(_vBox); _scroll.AddChild(_vBox);
panel.AddChild(_scroll); panel.AddChild(_scroll);
@@ -67,8 +71,9 @@ namespace Content.Client.Lobby.UI
// Adds a row // Adds a row
public void AddItem(string name, string status) public void AddItem(string name, string status)
{ {
var hbox = new HBoxContainer var hbox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
}; };

View File

@@ -14,6 +14,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Network; using Robust.Shared.Network;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
using UsernameHelpers = Robust.Shared.AuthLib.UsernameHelpers; using UsernameHelpers = Robust.Shared.AuthLib.UsernameHelpers;
namespace Content.Client.MainMenu namespace Content.Client.MainMenu
@@ -221,8 +222,9 @@ namespace Content.Client.MainMenu
var layout = new LayoutContainer(); var layout = new LayoutContainer();
AddChild(layout); AddChild(layout);
var vBox = new VBoxContainer var vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
StyleIdentifier = "mainMenuVBox" StyleIdentifier = "mainMenuVBox"
}; };
@@ -240,7 +242,11 @@ namespace Content.Client.MainMenu
}; };
vBox.AddChild(logo); vBox.AddChild(logo);
var userNameHBox = new HBoxContainer {SeparationOverride = 4}; var userNameHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 4
};
vBox.AddChild(userNameHBox); vBox.AddChild(userNameHBox);
userNameHBox.AddChild(new Label {Text = Loc.GetString("main-menu-username-label") }); userNameHBox.AddChild(new Label {Text = Loc.GetString("main-menu-username-label") });

View File

@@ -6,6 +6,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Content.Shared.MedicalScanner.SharedMedicalScannerComponent; using static Content.Shared.MedicalScanner.SharedMedicalScannerComponent;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.MedicalScanner.UI namespace Content.Client.MedicalScanner.UI
{ {
@@ -17,8 +18,9 @@ namespace Content.Client.MedicalScanner.UI
{ {
SetSize = (250, 100); SetSize = (250, 100);
Contents.AddChild(new VBoxContainer Contents.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(ScanButton = new Button (ScanButton = new Button

View File

@@ -14,6 +14,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BaseButton; using static Robust.Client.UserInterface.Controls.BaseButton;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.PDA namespace Content.Client.PDA
{ {
@@ -243,15 +244,15 @@ namespace Content.Client.PDA
public PanelContainer IDInfoContainer { get; } public PanelContainer IDInfoContainer { get; }
public RichTextLabel IDInfoLabel { get; } public RichTextLabel IDInfoLabel { get; }
public VBoxContainer UplinkTabContainer { get; } public BoxContainer UplinkTabContainer { get; }
protected readonly HSplitContainer CategoryAndListingsContainer; protected readonly HSplitContainer CategoryAndListingsContainer;
private readonly IPrototypeManager _prototypeManager; private readonly IPrototypeManager _prototypeManager;
public readonly VBoxContainer UplinkListingsContainer; public readonly BoxContainer UplinkListingsContainer;
public readonly VBoxContainer CategoryListContainer; public readonly BoxContainer CategoryListContainer;
public readonly RichTextLabel BalanceInfo; public readonly RichTextLabel BalanceInfo;
public event Action<ButtonEventArgs, UplinkListingData>? OnListingButtonPressed; public event Action<ButtonEventArgs, UplinkListingData>? OnListingButtonPressed;
public event Action<ButtonEventArgs, UplinkCategory>? OnCategoryButtonPressed; public event Action<ButtonEventArgs, UplinkCategory>? OnCategoryButtonPressed;
@@ -311,8 +312,9 @@ namespace Content.Client.PDA
VerticalAlignment = VAlignment.Center VerticalAlignment = VAlignment.Center
}; };
var innerHBoxContainer = new HBoxContainer var innerHBoxContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
IDInfoLabel, IDInfoLabel,
@@ -335,8 +337,9 @@ namespace Content.Client.PDA
ToggleMode = true, ToggleMode = true,
}; };
var mainMenuTabContainer = new VBoxContainer var mainMenuTabContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
HorizontalExpand = true, HorizontalExpand = true,
MinSize = (50, 50), MinSize = (50, 50),
@@ -353,8 +356,9 @@ namespace Content.Client.PDA
#region UPLINK_TAB #region UPLINK_TAB
//Uplink Tab //Uplink Tab
CategoryListContainer = new VBoxContainer CategoryListContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical
}; };
BalanceInfo = new RichTextLabel BalanceInfo = new RichTextLabel
@@ -400,8 +404,9 @@ namespace Content.Client.PDA
masterPanelContainer.AddChild(CategoryAndListingsContainer); masterPanelContainer.AddChild(CategoryAndListingsContainer);
//Actual list of buttons for buying a listing from the uplink. //Actual list of buttons for buying a listing from the uplink.
UplinkListingsContainer = new VBoxContainer UplinkListingsContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 2, SizeFlagsStretchRatio = 2,
@@ -409,8 +414,9 @@ namespace Content.Client.PDA
}; };
uplinkShopScrollContainer.AddChild(UplinkListingsContainer); uplinkShopScrollContainer.AddChild(UplinkListingsContainer);
var innerVboxContainer = new VBoxContainer var innerVboxContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
Children = Children =
@@ -420,8 +426,9 @@ namespace Content.Client.PDA
} }
}; };
UplinkTabContainer = new VBoxContainer UplinkTabContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
innerVboxContainer innerVboxContainer
@@ -495,14 +502,16 @@ namespace Content.Client.PDA
}; };
//Padding for the price lable. //Padding for the price lable.
var pricePadding = new HBoxContainer var pricePadding = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
MinSize = (32, 1), MinSize = (32, 1),
}; };
//Contains the name of the item and its price. Used for spacing item name and price. //Contains the name of the item and its price. Used for spacing item name and price.
var listingButtonHbox = new HBoxContainer var listingButtonHbox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
itemLabel, itemLabel,

View File

@@ -2,6 +2,7 @@
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Paper.UI namespace Content.Client.Paper.UI
{ {
@@ -13,7 +14,10 @@ namespace Content.Client.Paper.UI
public PaperWindow() public PaperWindow()
{ {
MinSize = SetSize = (300, 300); MinSize = SetSize = (300, 300);
var container = new VBoxContainer(); var container = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
_label = new RichTextLabel(); _label = new RichTextLabel();
Input = new LineEdit {Visible = false}; Input = new LineEdit {Visible = false};
container.AddChild(_label); container.AddChild(_label);

View File

@@ -15,6 +15,7 @@ using Robust.Shared.Maths;
using Robust.Shared.Noise; using Robust.Shared.Noise;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.ParticleAccelerator.UI namespace Content.Client.ParticleAccelerator.UI
{ {
@@ -32,7 +33,7 @@ namespace Content.Client.ParticleAccelerator.UI
private readonly Label _statusLabel; private readonly Label _statusLabel;
private readonly SpinBox _stateSpinBox; private readonly SpinBox _stateSpinBox;
private readonly VBoxContainer _alarmControl; private readonly BoxContainer _alarmControl;
private readonly Animation _alarmControlAnimation; private readonly Animation _alarmControlAnimation;
private readonly PASegmentControl _endCapTexture; private readonly PASegmentControl _endCapTexture;
@@ -138,8 +139,9 @@ namespace Content.Client.ParticleAccelerator.UI
}; };
_drawLabel = new Label(); _drawLabel = new Label();
var imgSize = new Vector2(32, 32); var imgSize = new Vector2(32, 32);
AddChild(new VBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new Control new Control
@@ -166,19 +168,22 @@ namespace Content.Client.ParticleAccelerator.UI
MinSize = (0, 4) MinSize = (0, 4)
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalExpand = true, VerticalExpand = true,
Children = Children =
{ {
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(4, 0, 0, 0), Margin = new Thickness(4, 0, 0, 0),
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label new Label
@@ -191,8 +196,9 @@ namespace Content.Client.ParticleAccelerator.UI
_onButton _onButton
} }
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
new Label new Label
@@ -213,8 +219,9 @@ namespace Content.Client.ParticleAccelerator.UI
{ {
VerticalExpand = true, VerticalExpand = true,
}, },
(_alarmControl = new VBoxContainer (_alarmControl = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new Label new Label
@@ -228,8 +235,9 @@ namespace Content.Client.ParticleAccelerator.UI
}), }),
} }
}, },
new VBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
MinSize = (186, 0), MinSize = (186, 0),
Children = Children =
{ {
@@ -292,8 +300,9 @@ namespace Content.Client.ParticleAccelerator.UI
} }
} }
}, },
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Margin = new Thickness(12, 0, 0, 0), Margin = new Thickness(12, 0, 0, 0),
Children = Children =
{ {

View File

@@ -8,6 +8,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Power.APC namespace Content.Client.Power.APC
{ {
@@ -143,19 +144,28 @@ namespace Content.Client.Power.APC
public ApcWindow() public ApcWindow()
{ {
Title = "APC"; Title = "APC";
var rows = new VBoxContainer(); var rows = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
var statusHeader = new Label {Text = "Power Status: "}; var statusHeader = new Label {Text = "Power Status: "};
rows.AddChild(statusHeader); rows.AddChild(statusHeader);
var breaker = new HBoxContainer(); var breaker = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var breakerLabel = new Label {Text = "Main Breaker: "}; var breakerLabel = new Label {Text = "Main Breaker: "};
BreakerButton = new CheckButton {Text = "Toggle"}; BreakerButton = new CheckButton {Text = "Toggle"};
breaker.AddChild(breakerLabel); breaker.AddChild(breakerLabel);
breaker.AddChild(BreakerButton); breaker.AddChild(BreakerButton);
rows.AddChild(breaker); rows.AddChild(breaker);
var externalStatus = new HBoxContainer(); var externalStatus = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var externalStatusLabel = new Label {Text = "External Power: "}; var externalStatusLabel = new Label {Text = "External Power: "};
ExternalPowerStateLabel = new Label {Text = "Good"}; ExternalPowerStateLabel = new Label {Text = "Good"};
ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood); ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood);
@@ -163,7 +173,10 @@ namespace Content.Client.Power.APC
externalStatus.AddChild(ExternalPowerStateLabel); externalStatus.AddChild(ExternalPowerStateLabel);
rows.AddChild(externalStatus); rows.AddChild(externalStatus);
var charge = new HBoxContainer(); var charge = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var chargeLabel = new Label {Text = "Charge:"}; var chargeLabel = new Label {Text = "Charge:"};
ChargeBar = new ProgressBar ChargeBar = new ProgressBar
{ {

View File

@@ -2,7 +2,7 @@
xmlns:scc="clr-namespace:Content.Client.GameObjects.Components.Power" xmlns:scc="clr-namespace:Content.Client.GameObjects.Components.Power"
Title="{Loc 'solar-control-window-title'}" Title="{Loc 'solar-control-window-title'}"
Resizable="False"> Resizable="False">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<GridContainer Columns="2"> <GridContainer Columns="2">
<!-- <!--
little secret: the reason I put the values little secret: the reason I put the values
@@ -27,6 +27,6 @@
<Label Text="{Loc 'solar-control-window-press-enter-to-confirm'}"/><Label Text=""/> <Label Text="{Loc 'solar-control-window-press-enter-to-confirm'}"/><Label Text=""/>
</GridContainer> </GridContainer>
<scc:SolarControlNotARadar Name="NotARadar"/> <scc:SolarControlNotARadar Name="NotARadar"/>
</HBoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -17,12 +17,13 @@ using Robust.Shared.Localization;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Preferences.UI namespace Content.Client.Preferences.UI
{ {
public class CharacterSetupGui : Control public class CharacterSetupGui : Control
{ {
private readonly VBoxContainer _charactersVBox; private readonly BoxContainer _charactersVBox;
private readonly Button _createNewCharacterButton; private readonly Button _createNewCharacterButton;
private readonly IEntityManager _entityManager; private readonly IEntityManager _entityManager;
private readonly HumanoidProfileEditor _humanoidProfileEditor; private readonly HumanoidProfileEditor _humanoidProfileEditor;
@@ -62,12 +63,17 @@ namespace Content.Client.Preferences.UI
margin.AddChild(panel); margin.AddChild(panel);
var vBox = new VBoxContainer {SeparationOverride = 0}; var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
SeparationOverride = 0
};
margin.AddChild(vBox); margin.AddChild(vBox);
var topHBox = new HBoxContainer var topHBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
MinSize = (0, 40), MinSize = (0, 40),
Children = Children =
{ {
@@ -104,14 +110,18 @@ namespace Content.Client.Preferences.UI
} }
}); });
var hBox = new HBoxContainer var hBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalExpand = true, VerticalExpand = true,
SeparationOverride = 0 SeparationOverride = 0
}; };
vBox.AddChild(hBox); vBox.AddChild(hBox);
_charactersVBox = new VBoxContainer(); _charactersVBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
hBox.AddChild(new ScrollContainer hBox.AddChild(new ScrollContainer
{ {
@@ -271,8 +281,9 @@ namespace Content.Client.Preferences.UI
preferencesManager.DeleteCharacter(profile); preferencesManager.DeleteCharacter(profile);
}; };
var internalHBox = new HBoxContainer var internalHBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
SeparationOverride = 0, SeparationOverride = 0,
Children = Children =

View File

@@ -23,6 +23,7 @@ using Robust.Shared.Prototypes;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Preferences.UI namespace Content.Client.Preferences.UI
{ {
@@ -52,7 +53,7 @@ namespace Content.Client.Preferences.UI
private readonly List<JobPrioritySelector> _jobPriorities; private readonly List<JobPrioritySelector> _jobPriorities;
private readonly OptionButton _preferenceUnavailableButton; private readonly OptionButton _preferenceUnavailableButton;
private readonly Dictionary<string, VBoxContainer> _jobCategories; private readonly Dictionary<string, BoxContainer> _jobCategories;
private readonly List<AntagPreferenceSelector> _antagPreferences; private readonly List<AntagPreferenceSelector> _antagPreferences;
@@ -75,21 +76,32 @@ namespace Content.Client.Preferences.UI
_preferencesManager = preferencesManager; _preferencesManager = preferencesManager;
var hbox = new HBoxContainer(); var hbox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
AddChild(hbox); AddChild(hbox);
#region Left #region Left
var vBox = new VBoxContainer {Margin = new Thickness(10)}; var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(10)
};
hbox.AddChild(vBox); hbox.AddChild(vBox);
var middleContainer = new HBoxContainer var middleContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 10 SeparationOverride = 10
}; };
vBox.AddChild(middleContainer); vBox.AddChild(middleContainer);
var leftColumn = new VBoxContainer(); var leftColumn = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
middleContainer.AddChild(leftColumn); middleContainer.AddChild(leftColumn);
#region Randomize #region Randomize
@@ -108,8 +120,9 @@ namespace Content.Client.Preferences.UI
#region Name #region Name
var namePanel = HighlightedContainer(); var namePanel = HighlightedContainer();
var nameHBox = new HBoxContainer var nameHBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalExpand = true VerticalExpand = true
}; };
var nameLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-name-label") }; var nameLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-name-label") };
@@ -136,10 +149,14 @@ namespace Content.Client.Preferences.UI
#region Appearance #region Appearance
var appearanceList = new VBoxContainer(); var appearanceList = new BoxContainer
var appearanceVBox = new VBoxContainer
{ {
Orientation = LayoutOrientation.Vertical
};
var appearanceVBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new ScrollContainer new ScrollContainer
@@ -155,8 +172,9 @@ namespace Content.Client.Preferences.UI
tabContainer.AddChild(appearanceVBox); tabContainer.AddChild(appearanceVBox);
tabContainer.SetTabTitle(0, Loc.GetString("humanoid-profile-editor-appearance-tab")); tabContainer.SetTabTitle(0, Loc.GetString("humanoid-profile-editor-appearance-tab"));
var sexAndAgeRow = new HBoxContainer var sexAndAgeRow = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 10 SeparationOverride = 10
}; };
@@ -165,7 +183,10 @@ namespace Content.Client.Preferences.UI
#region Sex #region Sex
var sexPanel = HighlightedContainer(); var sexPanel = HighlightedContainer();
var sexHBox = new HBoxContainer(); var sexHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var sexLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-sex-label") }; var sexLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-sex-label") };
var sexButtonGroup = new ButtonGroup(); var sexButtonGroup = new ButtonGroup();
@@ -212,7 +233,10 @@ namespace Content.Client.Preferences.UI
#region Age #region Age
var agePanel = HighlightedContainer(); var agePanel = HighlightedContainer();
var ageHBox = new HBoxContainer(); var ageHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var ageLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-age-label") }; var ageLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-age-label") };
_ageEdit = new LineEdit { MinSize = (40, 0) }; _ageEdit = new LineEdit { MinSize = (40, 0) };
_ageEdit.OnTextChanged += args => _ageEdit.OnTextChanged += args =>
@@ -231,7 +255,10 @@ namespace Content.Client.Preferences.UI
#region Gender #region Gender
var genderPanel = HighlightedContainer(); var genderPanel = HighlightedContainer();
var genderHBox = new HBoxContainer(); var genderHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var genderLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-pronouns-label") }; var genderLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-pronouns-label") };
_genderButton = new OptionButton(); _genderButton = new OptionButton();
@@ -257,7 +284,10 @@ namespace Content.Client.Preferences.UI
#region Hair #region Hair
var hairPanel = HighlightedContainer(); var hairPanel = HighlightedContainer();
var hairHBox = new HBoxContainer(); var hairHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
_hairPicker = new HairStylePicker _hairPicker = new HairStylePicker
{ {
@@ -315,7 +345,10 @@ namespace Content.Client.Preferences.UI
#region Clothing #region Clothing
var clothingPanel = HighlightedContainer(); var clothingPanel = HighlightedContainer();
var clothingHBox = new HBoxContainer(); var clothingHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var clothingLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-clothing-label") }; var clothingLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-clothing-label") };
_clothingButton = new OptionButton(); _clothingButton = new OptionButton();
@@ -339,7 +372,10 @@ namespace Content.Client.Preferences.UI
#region Backpack #region Backpack
var backpackPanel = HighlightedContainer(); var backpackPanel = HighlightedContainer();
var backpackHBox = new HBoxContainer(); var backpackHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var backpackLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-backpack-label") }; var backpackLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-backpack-label") };
_backpackButton = new OptionButton(); _backpackButton = new OptionButton();
@@ -364,7 +400,10 @@ namespace Content.Client.Preferences.UI
#region Eyes #region Eyes
var eyesPanel = HighlightedContainer(); var eyesPanel = HighlightedContainer();
var eyesVBox = new VBoxContainer(); var eyesVBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
var eyesLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-eyes-label") }; var eyesLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-eyes-label") };
_eyesPicker = new EyeColorPicker(); _eyesPicker = new EyeColorPicker();
@@ -389,10 +428,14 @@ namespace Content.Client.Preferences.UI
#region Jobs #region Jobs
var jobList = new VBoxContainer(); var jobList = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
var jobVBox = new VBoxContainer var jobVBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(_preferenceUnavailableButton = new OptionButton()), (_preferenceUnavailableButton = new OptionButton()),
@@ -428,7 +471,7 @@ namespace Content.Client.Preferences.UI
}; };
_jobPriorities = new List<JobPrioritySelector>(); _jobPriorities = new List<JobPrioritySelector>();
_jobCategories = new Dictionary<string, VBoxContainer>(); _jobCategories = new Dictionary<string, BoxContainer>();
var firstCategory = true; var firstCategory = true;
@@ -438,8 +481,9 @@ namespace Content.Client.Preferences.UI
{ {
if (!_jobCategories.TryGetValue(department, out var category)) if (!_jobCategories.TryGetValue(department, out var category))
{ {
category = new VBoxContainer category = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Name = department, Name = department,
ToolTip = Loc.GetString("humanoid-profile-editor-jobs-amount-in-department-tooltip", ToolTip = Loc.GetString("humanoid-profile-editor-jobs-amount-in-department-tooltip",
("departmentName", department)) ("departmentName", department))
@@ -509,10 +553,14 @@ namespace Content.Client.Preferences.UI
#region Antags #region Antags
var antagList = new VBoxContainer(); var antagList = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
var antagVBox = new VBoxContainer var antagVBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
new ScrollContainer new ScrollContainer
@@ -552,13 +600,19 @@ namespace Content.Client.Preferences.UI
#endregion Antags #endregion Antags
var rightColumn = new VBoxContainer(); var rightColumn = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
middleContainer.AddChild(rightColumn); middleContainer.AddChild(rightColumn);
#region Import/Export #region Import/Export
var importExportPanelContainer = HighlightedContainer(); var importExportPanelContainer = HighlightedContainer();
var importExportHBox = new HBoxContainer(); var importExportHBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
var importButton = new Button var importButton = new Button
{ {
Text = Loc.GetString("humanoid-profile-editor-import-button"), Text = Loc.GetString("humanoid-profile-editor-import-button"),
@@ -598,8 +652,9 @@ namespace Content.Client.Preferences.UI
#region Right #region Right
vBox = new VBoxContainer() vBox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
HorizontalExpand = true, HorizontalExpand = true,
}; };
@@ -925,8 +980,9 @@ namespace Content.Client.Preferences.UI
icon.Texture = specifier.Frame0(); icon.Texture = specifier.Frame0();
} }
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
icon, icon,
@@ -968,8 +1024,9 @@ namespace Content.Client.Preferences.UI
_checkBox = new CheckBox {Text = $"{antag.Name}"}; _checkBox = new CheckBox {Text = $"{antag.Name}"};
_checkBox.OnToggled += OnCheckBoxToggled; _checkBox.OnToggled += OnCheckBoxToggled;
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
_checkBox _checkBox

View File

@@ -7,6 +7,7 @@ using Robust.Client.Utility;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Research.UI namespace Content.Client.Research.UI
{ {
@@ -71,36 +72,41 @@ namespace Content.Client.Research.UI
_futureTechnologies.OnItemSelected += FutureTechnologySelected; _futureTechnologies.OnItemSelected += FutureTechnologySelected;
var vbox = new VBoxContainer() var vbox = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
}; };
var hboxTechnologies = new HBoxContainer() var hboxTechnologies = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 2, SizeFlagsStretchRatio = 2,
SeparationOverride = 10, SeparationOverride = 10,
}; };
var hboxSelected = new HBoxContainer() var hboxSelected = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 1 SizeFlagsStretchRatio = 1
}; };
var vboxPoints = new VBoxContainer() var vboxPoints = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 1, SizeFlagsStretchRatio = 1,
}; };
var vboxTechInfo = new VBoxContainer() var vboxTechInfo = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
SizeFlagsStretchRatio = 3, SizeFlagsStretchRatio = 3,
@@ -109,9 +115,10 @@ namespace Content.Client.Research.UI
_pointLabel = new Label() { Text = Loc.GetString("research-console-menu-research-points-text", ("points", 0)) }; _pointLabel = new Label() { Text = Loc.GetString("research-console-menu-research-points-text", ("points", 0)) };
_pointsPerSecondLabel = new Label() { Text = Loc.GetString("research-console-menu-points-per-second-text", ("pointsPerSecond", 0)) }; _pointsPerSecondLabel = new Label() { Text = Loc.GetString("research-console-menu-points-per-second-text", ("pointsPerSecond", 0)) };
var vboxPointsButtons = new VBoxContainer() var vboxPointsButtons = new BoxContainer
{ {
Align = BoxContainer.AlignMode.End, Orientation = LayoutOrientation.Vertical,
Align = AlignMode.End,
HorizontalExpand = true, HorizontalExpand = true,
VerticalExpand = true, VerticalExpand = true,
}; };

View File

@@ -7,13 +7,14 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using static Content.Shared.GameTicking.SharedGameTicker; using static Content.Shared.GameTicking.SharedGameTicker;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.RoundEnd namespace Content.Client.RoundEnd
{ {
public sealed class RoundEndSummaryWindow : SS14Window public sealed class RoundEndSummaryWindow : SS14Window
{ {
private VBoxContainer RoundEndSummaryTab { get; } private BoxContainer RoundEndSummaryTab { get; }
private VBoxContainer PlayerManifestoTab { get; } private BoxContainer PlayerManifestoTab { get; }
private TabContainer RoundEndWindowTabs { get; } private TabContainer RoundEndWindowTabs { get; }
public RoundEndSummaryWindow(string gm, string roundEnd, TimeSpan roundTimeSpan, RoundEndMessageEvent.RoundEndPlayerInfo[] info) public RoundEndSummaryWindow(string gm, string roundEnd, TimeSpan roundTimeSpan, RoundEndMessageEvent.RoundEndPlayerInfo[] info)
@@ -27,14 +28,16 @@ namespace Content.Client.RoundEnd
//This tab would be a good place for things like: "x many people died.", //This tab would be a good place for things like: "x many people died.",
//"clown slipped the crew x times.", "x shots were fired this round.", etc. //"clown slipped the crew x times.", "x shots were fired this round.", etc.
//Also good for serious info. //Also good for serious info.
RoundEndSummaryTab = new VBoxContainer() RoundEndSummaryTab = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Name = Loc.GetString("round-end-summary-window-round-end-summary-tab-title") Name = Loc.GetString("round-end-summary-window-round-end-summary-tab-title")
}; };
//Tab for listing unique info per player. //Tab for listing unique info per player.
PlayerManifestoTab = new VBoxContainer() PlayerManifestoTab = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Name = Loc.GetString("round-end-summary-window-player-manifesto-tab-title") Name = Loc.GetString("round-end-summary-window-player-manifesto-tab-title")
}; };
@@ -70,7 +73,10 @@ namespace Content.Client.RoundEnd
{ {
VerticalExpand = true VerticalExpand = true
}; };
var innerScrollContainer = new VBoxContainer(); var innerScrollContainer = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
//Put observers at the bottom of the list. Put antags on top. //Put observers at the bottom of the list. Put antags on top.
var manifestSortedList = info.OrderBy(p => p.Observer).ThenBy(p => !p.Antag); var manifestSortedList = info.OrderBy(p => p.Observer).ThenBy(p => !p.Antag);

View File

@@ -19,6 +19,7 @@ using Robust.Shared.Localization;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Network; using Robust.Shared.Network;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Sandbox namespace Content.Client.Sandbox
{ {
@@ -47,7 +48,11 @@ namespace Content.Client.Sandbox
Title = Loc.GetString("sandbox-window-title"); Title = Loc.GetString("sandbox-window-title");
var vBox = new VBoxContainer { SeparationOverride = 4 }; var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
SeparationOverride = 4
};
Contents.AddChild(vBox); Contents.AddChild(vBox);
RespawnButton = new Button { Text = Loc.GetString("sandbox-window-respawn-button") }; RespawnButton = new Button { Text = Loc.GetString("sandbox-window-respawn-button") };

View File

@@ -16,6 +16,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Network; using Robust.Shared.Network;
using Robust.Shared.Players; using Robust.Shared.Players;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Storage namespace Content.Client.Storage
{ {
@@ -177,7 +178,7 @@ namespace Content.Client.Storage
private class StorageWindow : SS14Window private class StorageWindow : SS14Window
{ {
private Control VSplitContainer; private Control VSplitContainer;
private readonly VBoxContainer _entityList; private readonly BoxContainer _entityList;
private readonly Label _information; private readonly Label _information;
public ClientStorageComponent StorageEntity; public ClientStorageComponent StorageEntity;
@@ -213,8 +214,9 @@ namespace Content.Client.Storage
} }
}; };
VSplitContainer = new VBoxContainer() VSplitContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
MouseFilter = MouseFilterMode.Ignore, MouseFilter = MouseFilterMode.Ignore,
}; };
containerButton.AddChild(VSplitContainer); containerButton.AddChild(VSplitContainer);
@@ -232,8 +234,9 @@ namespace Content.Client.Storage
HScrollEnabled = false, HScrollEnabled = false,
VScrollEnabled = true, VScrollEnabled = true,
}; };
_entityList = new VBoxContainer _entityList = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true HorizontalExpand = true
}; };
listScrollContainer.AddChild(_entityList); listScrollContainer.AddChild(_entityList);
@@ -346,7 +349,10 @@ namespace Content.Client.Storage
}; };
AddChild(ActualButton); AddChild(ActualButton);
var hBoxContainer = new HBoxContainer(); var hBoxContainer = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal
};
EntitySpriteView = new SpriteView EntitySpriteView = new SpriteView
{ {
MinSize = new Vector2(32.0f, 32.0f), MinSize = new Vector2(32.0f, 32.0f),

View File

@@ -3,20 +3,22 @@ using Content.Client.Stylesheets;
using Robust.Client.UserInterface; using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Strip namespace Content.Client.Strip
{ {
public class StrippingMenu : SS14Window public class StrippingMenu : SS14Window
{ {
private readonly VBoxContainer _vboxContainer; private readonly BoxContainer _vboxContainer;
public StrippingMenu(string title) public StrippingMenu(string title)
{ {
MinSize = SetSize = (400, 600); MinSize = SetSize = (400, 600);
Title = title; Title = title;
_vboxContainer = new VBoxContainer() _vboxContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true, VerticalExpand = true,
SeparationOverride = 5, SeparationOverride = 5,
}; };
@@ -39,8 +41,9 @@ namespace Content.Client.Strip
button.OnPressed += onPressed; button.OnPressed += onPressed;
_vboxContainer.AddChild(new HBoxContainer() _vboxContainer.AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
SeparationOverride = 5, SeparationOverride = 5,
Children = Children =

View File

@@ -1,7 +1,7 @@
<Control xmlns="https://spacestation14.io"> <Control xmlns="https://spacestation14.io">
<VBoxContainer SeparationOverride="0"> <BoxContainer Orientation="Vertical" SeparationOverride="0">
<Button Name="RoleButton"> <Button Name="RoleButton">
<Label Name="TimerLabel" SizeFlagsHorizontal="ShrinkEnd" SizeFlagsVertical="ShrinkEnd" /> <Label Name="TimerLabel" SizeFlagsHorizontal="ShrinkEnd" SizeFlagsVertical="ShrinkEnd" />
</Button> </Button>
</VBoxContainer> </BoxContainer>
</Control> </Control>

View File

@@ -10,6 +10,7 @@ using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.UserInterface.Atmos.GasTank namespace Content.Client.UserInterface.Atmos.GasTank
{ {
@@ -18,7 +19,7 @@ namespace Content.Client.UserInterface.Atmos.GasTank
{ {
private GasTankBoundUserInterface _owner; private GasTankBoundUserInterface _owner;
private readonly Label _lblName; private readonly Label _lblName;
private readonly VBoxContainer _topContainer; private readonly BoxContainer _topContainer;
private readonly Control _contentContainer; private readonly Control _contentContainer;
@@ -68,11 +69,15 @@ namespace Content.Client.UserInterface.Atmos.GasTank
LayoutContainer.SetGrowHorizontal(bottomWrap, LayoutContainer.GrowDirection.Both); LayoutContainer.SetGrowHorizontal(bottomWrap, LayoutContainer.GrowDirection.Both);
var topContainerWrap = new VBoxContainer var topContainerWrap = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Children = Children =
{ {
(_topContainer = new VBoxContainer()), (_topContainer = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
}),
new Control {MinSize = (0, 110)} new Control {MinSize = (0, 110)}
} }
}; };
@@ -83,8 +88,9 @@ namespace Content.Client.UserInterface.Atmos.GasTank
var font = _resourceCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 13); var font = _resourceCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 13);
var topRow = new HBoxContainer var topRow = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Margin = new Thickness(4, 2, 12, 2), Margin = new Thickness(4, 2, 12, 2),
Children = Children =
{ {
@@ -111,8 +117,9 @@ namespace Content.Client.UserInterface.Atmos.GasTank
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#202025")}, PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#202025")},
Children = Children =
{ {
(_contentContainer = new VBoxContainer (_contentContainer = new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
Margin = new Thickness(8, 4), Margin = new Thickness(8, 4),
}) })
} }
@@ -141,8 +148,9 @@ namespace Content.Client.UserInterface.Atmos.GasTank
_btnInternals = new Button {Text = Loc.GetString("gas-tank-window-internals-toggle-button") }; _btnInternals = new Button {Text = Loc.GetString("gas-tank-window-internals-toggle-button") };
_contentContainer.AddChild( _contentContainer.AddChild(
new HBoxContainer new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Margin = new Thickness(0, 7, 0, 0), Margin = new Thickness(0, 7, 0, 0),
Children = {_lblInternals, _btnInternals} Children = {_lblInternals, _btnInternals}
}); });

View File

@@ -23,6 +23,7 @@ using Robust.Shared.Log;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
using Timer = Robust.Shared.Timing.Timer; using Timer = Robust.Shared.Timing.Timer;
namespace Content.Client.Verbs namespace Content.Client.Verbs
@@ -326,13 +327,16 @@ namespace Content.Client.Verbs
private sealed class VerbPopup : Popup private sealed class VerbPopup : Popup
{ {
public VBoxContainer List { get; } public BoxContainer List { get; }
public VerbPopup() public VerbPopup()
{ {
AddChild(new PanelContainer AddChild(new PanelContainer
{ {
Children = {(List = new VBoxContainer())}, Children = {(List = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
})},
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#111E")} PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#111E")}
}); });
} }
@@ -357,8 +361,9 @@ namespace Content.Client.Verbs
public VerbButton() public VerbButton()
{ {
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(_icon = new TextureRect (_icon = new TextureRect
@@ -417,8 +422,9 @@ namespace Content.Client.Verbs
MouseFilter = MouseFilterMode.Stop; MouseFilter = MouseFilterMode.Stop;
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
Children = Children =
{ {
(_icon = new TextureRect (_icon = new TextureRect

View File

@@ -3,8 +3,8 @@
xmlns:hudUi="clr-namespace:Content.Client.HUD.UI" xmlns:hudUi="clr-namespace:Content.Client.HUD.UI"
MouseFilter="Stop" MinSize="350 150"> MouseFilter="Stop" MinSize="350 150">
<PanelContainer StyleClasses="AngleRect" /> <PanelContainer StyleClasses="AngleRect" />
<VBoxContainer> <BoxContainer Orientation="Vertical">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<MarginContainer MarginLeftOverride="8" HorizontalExpand="True"> <MarginContainer MarginLeftOverride="8" HorizontalExpand="True">
<Label Text="{Loc 'ui-vote-create-title'}" VAlign="Center" StyleClasses="LabelHeading" /> <Label Text="{Loc 'ui-vote-create-title'}" VAlign="Center" StyleClasses="LabelHeading" />
</MarginContainer> </MarginContainer>
@@ -12,17 +12,17 @@
<TextureButton Name="CloseButton" StyleClasses="windowCloseButton" <TextureButton Name="CloseButton" StyleClasses="windowCloseButton"
SizeFlagsVertical="ShrinkCenter" /> SizeFlagsVertical="ShrinkCenter" />
</MarginContainer> </MarginContainer>
</HBoxContainer> </BoxContainer>
<hudUi:HighDivider /> <hudUi:HighDivider />
<MarginContainer SizeFlagsHorizontal="Fill" SizeFlagsVertical="Expand" <MarginContainer SizeFlagsHorizontal="Fill" SizeFlagsVertical="Expand"
MarginLeftOverride="8" MarginRightOverride="8" MarginTopOverride="2"> MarginLeftOverride="8" MarginRightOverride="8" MarginTopOverride="2">
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<OptionButton Name="VoteTypeButton" HorizontalExpand="True" /> <OptionButton Name="VoteTypeButton" HorizontalExpand="True" />
<Control HorizontalExpand="True"> <Control HorizontalExpand="True">
<OptionButton Name="VoteSecondButton" Visible="False" /> <OptionButton Name="VoteSecondButton" Visible="False" />
</Control> </Control>
</HBoxContainer> </BoxContainer>
</MarginContainer> </MarginContainer>
<MarginContainer SizeFlagsHorizontal="Fill" <MarginContainer SizeFlagsHorizontal="Fill"
@@ -35,5 +35,5 @@
<Label StyleClasses="LabelSubText" Text="{Loc 'ui-vote-fluff'}" /> <Label StyleClasses="LabelSubText" Text="{Loc 'ui-vote-fluff'}" />
</MarginContainer> </MarginContainer>
</VBoxContainer> </BoxContainer>
</ui:VoteCallMenu> </ui:VoteCallMenu>

View File

@@ -1,18 +1,18 @@
<Control xmlns="https://spacestation14.io"> <Control xmlns="https://spacestation14.io">
<PanelContainer StyleClasses="AngleRect" /> <PanelContainer StyleClasses="AngleRect" />
<MarginContainer MarginLeftOverride="4" MarginRightOverride="4" MarginTopOverride="4" MarginBottomOverride="4"> <MarginContainer MarginLeftOverride="4" MarginRightOverride="4" MarginTopOverride="4" MarginBottomOverride="4">
<VBoxContainer> <BoxContainer Orientation="Vertical">
<Label Name="VoteCaller" /> <Label Name="VoteCaller" />
<Label Name="VoteTitle" /> <Label Name="VoteTitle" />
<GridContainer Columns="3" Name="VoteOptionsContainer" /> <GridContainer Columns="3" Name="VoteOptionsContainer" />
<HBoxContainer> <BoxContainer Orientation="Horizontal">
<MarginContainer HorizontalExpand="True" MarginLeftOverride="2" MarginRightOverride="2" <MarginContainer HorizontalExpand="True" MarginLeftOverride="2" MarginRightOverride="2"
MarginTopOverride="2" MarginBottomOverride="2"> MarginTopOverride="2" MarginBottomOverride="2">
<ProgressBar Name="TimeLeftBar" MinValue="0" MaxValue="1" /> <ProgressBar Name="TimeLeftBar" MinValue="0" MaxValue="1" />
</MarginContainer> </MarginContainer>
<Label Name="TimeLeftText" /> <Label Name="TimeLeftText" />
</HBoxContainer> </BoxContainer>
</VBoxContainer> </BoxContainer>
</MarginContainer> </MarginContainer>
</Control> </Control>

View File

@@ -9,6 +9,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Weapons.Ranged.Barrels.Components namespace Content.Client.Weapons.Ranged.Barrels.Components
{ {
@@ -58,7 +59,7 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
private sealed class StatusControl : Control private sealed class StatusControl : Control
{ {
private readonly ClientBatteryBarrelComponent _parent; private readonly ClientBatteryBarrelComponent _parent;
private readonly HBoxContainer _bulletsList; private readonly BoxContainer _bulletsList;
private readonly Label _noBatteryLabel; private readonly Label _noBatteryLabel;
private readonly Label _ammoCount; private readonly Label _ammoCount;
@@ -69,8 +70,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
HorizontalExpand = true; HorizontalExpand = true;
VerticalAlignment = VAlignment.Center; VerticalAlignment = VAlignment.Center;
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -79,8 +81,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
(_bulletsList = new HBoxContainer (_bulletsList = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalAlignment = VAlignment.Center, VerticalAlignment = VAlignment.Center,
SeparationOverride = 4 SeparationOverride = 4
}), }),

View File

@@ -11,6 +11,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Weapons.Ranged.Barrels.Components namespace Content.Client.Weapons.Ranged.Barrels.Components
{ {
@@ -68,8 +69,8 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
private sealed class StatusControl : Control private sealed class StatusControl : Control
{ {
private readonly ClientBoltActionBarrelComponent _parent; private readonly ClientBoltActionBarrelComponent _parent;
private readonly HBoxContainer _bulletsListTop; private readonly BoxContainer _bulletsListTop;
private readonly HBoxContainer _bulletsListBottom; private readonly BoxContainer _bulletsListBottom;
private readonly TextureRect _chamberedBullet; private readonly TextureRect _chamberedBullet;
private readonly Label _noMagazineLabel; private readonly Label _noMagazineLabel;
@@ -79,16 +80,22 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
_parent = parent; _parent = parent;
HorizontalExpand = true; HorizontalExpand = true;
VerticalAlignment = VAlignment.Center; VerticalAlignment = VAlignment.Center;
AddChild(new VBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
VerticalAlignment = VAlignment.Center, VerticalAlignment = VAlignment.Center,
SeparationOverride = 0, SeparationOverride = 0,
Children = Children =
{ {
(_bulletsListTop = new HBoxContainer {SeparationOverride = 0}), (_bulletsListTop = new BoxContainer
new HBoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 0
}),
new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -97,8 +104,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
(_bulletsListBottom = new HBoxContainer (_bulletsListBottom = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalAlignment = VAlignment.Center, VerticalAlignment = VAlignment.Center,
SeparationOverride = 0 SeparationOverride = 0
}), }),

View File

@@ -17,6 +17,7 @@ using Robust.Shared.Network;
using Robust.Shared.Players; using Robust.Shared.Players;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Weapons.Ranged.Barrels.Components namespace Content.Client.Weapons.Ranged.Barrels.Components
{ {
@@ -134,7 +135,7 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
private sealed class StatusControl : Control private sealed class StatusControl : Control
{ {
private readonly ClientMagazineBarrelComponent _parent; private readonly ClientMagazineBarrelComponent _parent;
private readonly HBoxContainer _bulletsList; private readonly BoxContainer _bulletsList;
private readonly TextureRect _chamberedBullet; private readonly TextureRect _chamberedBullet;
private readonly Label _noMagazineLabel; private readonly Label _noMagazineLabel;
private readonly Label _ammoCount; private readonly Label _ammoCount;
@@ -146,8 +147,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
HorizontalExpand = true; HorizontalExpand = true;
VerticalAlignment = VAlignment.Center; VerticalAlignment = VAlignment.Center;
AddChild(new HBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -163,8 +165,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
(_bulletsList = new HBoxContainer (_bulletsList = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalAlignment = VAlignment.Center, VerticalAlignment = VAlignment.Center,
SeparationOverride = 0 SeparationOverride = 0
}), }),

View File

@@ -11,6 +11,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Weapons.Ranged.Barrels.Components namespace Content.Client.Weapons.Ranged.Barrels.Components
{ {
@@ -68,8 +69,8 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
private sealed class StatusControl : Control private sealed class StatusControl : Control
{ {
private readonly ClientPumpBarrelComponent _parent; private readonly ClientPumpBarrelComponent _parent;
private readonly HBoxContainer _bulletsListTop; private readonly BoxContainer _bulletsListTop;
private readonly HBoxContainer _bulletsListBottom; private readonly BoxContainer _bulletsListBottom;
private readonly TextureRect _chamberedBullet; private readonly TextureRect _chamberedBullet;
private readonly Label _noMagazineLabel; private readonly Label _noMagazineLabel;
@@ -79,16 +80,22 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
_parent = parent; _parent = parent;
HorizontalExpand = true; HorizontalExpand = true;
VerticalAlignment = VAlignment.Center; VerticalAlignment = VAlignment.Center;
AddChild(new VBoxContainer AddChild(new BoxContainer
{ {
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true, HorizontalExpand = true,
VerticalAlignment = VAlignment.Center, VerticalAlignment = VAlignment.Center,
SeparationOverride = 0, SeparationOverride = 0,
Children = Children =
{ {
(_bulletsListTop = new HBoxContainer {SeparationOverride = 0}), (_bulletsListTop = new BoxContainer
new HBoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
SeparationOverride = 0
}),
new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
@@ -97,8 +104,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
HorizontalExpand = true, HorizontalExpand = true,
Children = Children =
{ {
(_bulletsListBottom = new HBoxContainer (_bulletsListBottom = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
VerticalAlignment = VAlignment.Center, VerticalAlignment = VAlignment.Center,
SeparationOverride = 0 SeparationOverride = 0
}), }),

View File

@@ -9,6 +9,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Weapons.Ranged.Barrels.Components namespace Content.Client.Weapons.Ranged.Barrels.Components
{ {
@@ -62,7 +63,7 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
private sealed class StatusControl : Control private sealed class StatusControl : Control
{ {
private readonly ClientRevolverBarrelComponent _parent; private readonly ClientRevolverBarrelComponent _parent;
private readonly HBoxContainer _bulletsList; private readonly BoxContainer _bulletsList;
public StatusControl(ClientRevolverBarrelComponent parent) public StatusControl(ClientRevolverBarrelComponent parent)
{ {
@@ -70,8 +71,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
_parent = parent; _parent = parent;
HorizontalExpand = true; HorizontalExpand = true;
VerticalAlignment = VAlignment.Center; VerticalAlignment = VAlignment.Center;
AddChild((_bulletsList = new HBoxContainer AddChild((_bulletsList = new BoxContainer
{ {
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true, HorizontalExpand = true,
VerticalAlignment = VAlignment.Center, VerticalAlignment = VAlignment.Center,
SeparationOverride = 0 SeparationOverride = 0

Some files were not shown because too many files have changed in this diff Show More