Re-organize all projects (#4166)

This commit is contained in:
DrSmugleaf
2021-06-09 22:19:39 +02:00
committed by GitHub
parent 9f50e4061b
commit ff1a2d97ea
1773 changed files with 5258 additions and 5508 deletions

View File

@@ -0,0 +1,61 @@
using System;
using Content.Client.Stylesheets;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
namespace Content.Client.Strip
{
public class StrippingMenu : SS14Window
{
private readonly VBoxContainer _vboxContainer;
public StrippingMenu(string title)
{
MinSize = SetSize = (400, 600);
Title = title;
_vboxContainer = new VBoxContainer()
{
VerticalExpand = true,
SeparationOverride = 5,
};
Contents.AddChild(_vboxContainer);
}
public void ClearButtons()
{
_vboxContainer.DisposeAllChildren();
}
public void AddButton(string title, string name, Action<BaseButton.ButtonEventArgs> onPressed)
{
var button = new Button()
{
Text = name,
StyleClasses = { StyleBase.ButtonOpenRight }
};
button.OnPressed += onPressed;
_vboxContainer.AddChild(new HBoxContainer()
{
HorizontalExpand = true,
SeparationOverride = 5,
Children =
{
new Label()
{
Text = $"{title}:"
},
new Control()
{
HorizontalExpand = true
},
button,
}
});
}
}
}