Replace most VBox/HBoxContainers with BoxContainers (#4274)
This commit is contained in:
@@ -9,6 +9,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
{
|
||||
@@ -58,7 +59,7 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
private sealed class StatusControl : Control
|
||||
{
|
||||
private readonly ClientBatteryBarrelComponent _parent;
|
||||
private readonly HBoxContainer _bulletsList;
|
||||
private readonly BoxContainer _bulletsList;
|
||||
private readonly Label _noBatteryLabel;
|
||||
private readonly Label _ammoCount;
|
||||
|
||||
@@ -69,8 +70,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
|
||||
AddChild(new HBoxContainer
|
||||
AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
@@ -79,8 +81,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
(_bulletsList = new HBoxContainer
|
||||
(_bulletsList = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SeparationOverride = 4
|
||||
}),
|
||||
|
||||
@@ -11,6 +11,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
{
|
||||
@@ -68,8 +69,8 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
private sealed class StatusControl : Control
|
||||
{
|
||||
private readonly ClientBoltActionBarrelComponent _parent;
|
||||
private readonly HBoxContainer _bulletsListTop;
|
||||
private readonly HBoxContainer _bulletsListBottom;
|
||||
private readonly BoxContainer _bulletsListTop;
|
||||
private readonly BoxContainer _bulletsListBottom;
|
||||
private readonly TextureRect _chamberedBullet;
|
||||
private readonly Label _noMagazineLabel;
|
||||
|
||||
@@ -79,16 +80,22 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
_parent = parent;
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
AddChild(new VBoxContainer
|
||||
AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
HorizontalExpand = true,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SeparationOverride = 0,
|
||||
Children =
|
||||
{
|
||||
(_bulletsListTop = new HBoxContainer {SeparationOverride = 0}),
|
||||
new HBoxContainer
|
||||
(_bulletsListTop = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
SeparationOverride = 0
|
||||
}),
|
||||
new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
@@ -97,8 +104,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
(_bulletsListBottom = new HBoxContainer
|
||||
(_bulletsListBottom = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SeparationOverride = 0
|
||||
}),
|
||||
|
||||
@@ -17,6 +17,7 @@ using Robust.Shared.Network;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
{
|
||||
@@ -134,7 +135,7 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
private sealed class StatusControl : Control
|
||||
{
|
||||
private readonly ClientMagazineBarrelComponent _parent;
|
||||
private readonly HBoxContainer _bulletsList;
|
||||
private readonly BoxContainer _bulletsList;
|
||||
private readonly TextureRect _chamberedBullet;
|
||||
private readonly Label _noMagazineLabel;
|
||||
private readonly Label _ammoCount;
|
||||
@@ -146,8 +147,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
|
||||
AddChild(new HBoxContainer
|
||||
AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
@@ -163,8 +165,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
(_bulletsList = new HBoxContainer
|
||||
(_bulletsList = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SeparationOverride = 0
|
||||
}),
|
||||
|
||||
@@ -11,6 +11,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
{
|
||||
@@ -68,8 +69,8 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
private sealed class StatusControl : Control
|
||||
{
|
||||
private readonly ClientPumpBarrelComponent _parent;
|
||||
private readonly HBoxContainer _bulletsListTop;
|
||||
private readonly HBoxContainer _bulletsListBottom;
|
||||
private readonly BoxContainer _bulletsListTop;
|
||||
private readonly BoxContainer _bulletsListBottom;
|
||||
private readonly TextureRect _chamberedBullet;
|
||||
private readonly Label _noMagazineLabel;
|
||||
|
||||
@@ -79,16 +80,22 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
_parent = parent;
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
AddChild(new VBoxContainer
|
||||
AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
HorizontalExpand = true,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SeparationOverride = 0,
|
||||
Children =
|
||||
{
|
||||
(_bulletsListTop = new HBoxContainer {SeparationOverride = 0}),
|
||||
new HBoxContainer
|
||||
(_bulletsListTop = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
SeparationOverride = 0
|
||||
}),
|
||||
new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
@@ -97,8 +104,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
HorizontalExpand = true,
|
||||
Children =
|
||||
{
|
||||
(_bulletsListBottom = new HBoxContainer
|
||||
(_bulletsListBottom = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SeparationOverride = 0
|
||||
}),
|
||||
|
||||
@@ -9,6 +9,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
{
|
||||
@@ -62,7 +63,7 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
private sealed class StatusControl : Control
|
||||
{
|
||||
private readonly ClientRevolverBarrelComponent _parent;
|
||||
private readonly HBoxContainer _bulletsList;
|
||||
private readonly BoxContainer _bulletsList;
|
||||
|
||||
public StatusControl(ClientRevolverBarrelComponent parent)
|
||||
{
|
||||
@@ -70,8 +71,9 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
||||
_parent = parent;
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
AddChild((_bulletsList = new HBoxContainer
|
||||
AddChild((_bulletsList = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
HorizontalExpand = true,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SeparationOverride = 0
|
||||
|
||||
Reference in New Issue
Block a user