More minor UI refactor stuff (#11287)

This commit is contained in:
wrexbe
2022-09-14 20:42:35 -07:00
committed by GitHub
parent 82eff53a91
commit dc8cc81137
12 changed files with 190 additions and 175 deletions

View File

@@ -0,0 +1,29 @@
using Robust.Client.UserInterface.Controls;
namespace Content.Client.UserInterface.Controls
{
public sealed class Placeholder : PanelContainer
{
public const string StyleClassPlaceholderText = "PlaceholderText";
private readonly Label _label;
public string? PlaceholderText
{
get => _label.Text;
set => _label.Text = value;
}
public Placeholder()
{
_label = new Label
{
VerticalAlignment = VAlignment.Stretch,
Align = Label.AlignMode.Center,
VAlign = Label.VAlignMode.Center
};
_label.AddStyleClass(StyleClassPlaceholderText);
AddChild(_label);
}
}
}