Replace most VBox/HBoxContainers with BoxContainers (#4274)
This commit is contained in:
@@ -10,6 +10,7 @@ using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Prototypes;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Content.Client.EscapeMenu.UI
|
||||
{
|
||||
@@ -47,10 +48,14 @@ namespace Content.Client.EscapeMenu.UI
|
||||
{
|
||||
_cfg = cfg;
|
||||
_prototypeManager = proMan;
|
||||
var vBox = new VBoxContainer();
|
||||
|
||||
var contents = new VBoxContainer
|
||||
var vBox = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical
|
||||
};
|
||||
|
||||
var contents = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Margin = new Thickness(2, 2, 2, 0),
|
||||
VerticalExpand = true,
|
||||
};
|
||||
@@ -70,8 +75,9 @@ namespace Content.Client.EscapeMenu.UI
|
||||
LightingPresetOption.AddItem(Loc.GetString("ui-options-lighting-high"));
|
||||
LightingPresetOption.OnItemSelected += OnLightingQualityChanged;
|
||||
|
||||
contents.AddChild(new HBoxContainer
|
||||
contents.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
Children =
|
||||
{
|
||||
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.OnItemSelected += OnUIScaleChanged;
|
||||
|
||||
contents.AddChild(new HBoxContainer
|
||||
contents.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
Children =
|
||||
{
|
||||
new Label {Text = Loc.GetString("ui-options-scale-label")},
|
||||
@@ -114,8 +121,9 @@ namespace Content.Client.EscapeMenu.UI
|
||||
}
|
||||
_hudThemeOption.OnItemSelected += OnHudThemeChanged;
|
||||
|
||||
contents.AddChild(new HBoxContainer
|
||||
contents.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
Children =
|
||||
{
|
||||
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.OnToggled += OnCheckBoxToggled;
|
||||
|
||||
contents.AddChild(new HBoxContainer
|
||||
contents.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
Children =
|
||||
{
|
||||
_viewportStretchCheckBox,
|
||||
(_viewportScaleBox = new HBoxContainer
|
||||
(_viewportScaleBox = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
Children =
|
||||
{
|
||||
(_viewportScaleText = new Label
|
||||
|
||||
Reference in New Issue
Block a user