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

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