Files
tbd-station-14/Content.Client/UserInterface/Placeholder.cs
DrSmugleaf 902aa128c2 Enable nullability in Content.Client (#3257)
* Enable nullability in Content.Client

* Remove #nullable enable

* Merge fixes

* Remove Debug.Assert

* Merge fixes

* Fix build

* Fix build
2021-03-10 14:48:29 +01:00

30 lines
754 B
C#

using Robust.Client.UserInterface.Controls;
namespace Content.Client.UserInterface
{
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);
}
}
}