Replace most VBox/HBoxContainers with BoxContainers (#4274)
This commit is contained in:
@@ -15,6 +15,7 @@ using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using static Content.Shared.Wires.SharedWiresComponent;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Content.Client.Wires.UI
|
||||
{
|
||||
@@ -66,8 +67,9 @@ namespace Content.Client.Wires.UI
|
||||
MouseFilter = MouseFilterMode.Pass
|
||||
};
|
||||
|
||||
var shadow = new HBoxContainer
|
||||
var shadow = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
Children =
|
||||
{
|
||||
new PanelContainer
|
||||
@@ -90,8 +92,16 @@ namespace Content.Client.Wires.UI
|
||||
}
|
||||
};
|
||||
|
||||
var wrappingHBox = new HBoxContainer();
|
||||
_wiresHBox = new HBoxContainer {SeparationOverride = 4, VerticalAlignment = VAlignment.Bottom};
|
||||
var wrappingHBox = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal
|
||||
};
|
||||
_wiresHBox = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
SeparationOverride = 4,
|
||||
VerticalAlignment = VAlignment.Bottom
|
||||
};
|
||||
|
||||
wrappingHBox.AddChild(new Control {MinSize = (20, 0)});
|
||||
wrappingHBox.AddChild(_wiresHBox);
|
||||
@@ -123,11 +133,15 @@ namespace Content.Client.Wires.UI
|
||||
LayoutContainer.SetAnchorPreset(bottomWrap, LayoutContainer.LayoutPreset.VerticalCenterWide);
|
||||
LayoutContainer.SetGrowHorizontal(bottomWrap, LayoutContainer.GrowDirection.Both);
|
||||
|
||||
var topContainerWrap = new VBoxContainer
|
||||
var topContainerWrap = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Children =
|
||||
{
|
||||
(_topContainer = new VBoxContainer()),
|
||||
(_topContainer = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical
|
||||
}),
|
||||
new Control {MinSize = (0, 110)}
|
||||
}
|
||||
};
|
||||
@@ -140,8 +154,9 @@ namespace Content.Client.Wires.UI
|
||||
var fontSmall = _resourceCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 10);
|
||||
|
||||
Button helpButton;
|
||||
var topRow = new HBoxContainer
|
||||
var topRow = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
Margin = new Thickness(4, 2, 12, 2),
|
||||
Children =
|
||||
{
|
||||
@@ -188,8 +203,9 @@ namespace Content.Client.Wires.UI
|
||||
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#202025")},
|
||||
Children =
|
||||
{
|
||||
new HBoxContainer
|
||||
new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
Children =
|
||||
{
|
||||
(_statusContainer = new GridContainer
|
||||
@@ -553,7 +569,11 @@ namespace Content.Client.Wires.UI
|
||||
|
||||
var font = resourceCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 12);
|
||||
|
||||
var hBox = new HBoxContainer {SeparationOverride = 4};
|
||||
var hBox = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
SeparationOverride = 4
|
||||
};
|
||||
hBox.AddChild(new Label
|
||||
{
|
||||
Text = data.Text,
|
||||
|
||||
Reference in New Issue
Block a user