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