2019-05-14 01:19:25 +02:00
|
|
|
using Robust.Client.UserInterface.Controls;
|
|
|
|
|
|
2022-09-14 20:42:35 -07:00
|
|
|
namespace Content.Client.UserInterface.Controls
|
2019-05-14 01:19:25 +02:00
|
|
|
{
|
|
|
|
|
public sealed class Placeholder : PanelContainer
|
|
|
|
|
{
|
|
|
|
|
public const string StyleClassPlaceholderText = "PlaceholderText";
|
|
|
|
|
|
|
|
|
|
private readonly Label _label;
|
|
|
|
|
|
2021-03-10 14:48:29 +01:00
|
|
|
public string? PlaceholderText
|
2019-05-14 01:19:25 +02:00
|
|
|
{
|
|
|
|
|
get => _label.Text;
|
|
|
|
|
set => _label.Text = value;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-10 14:48:29 +01:00
|
|
|
public Placeholder()
|
2019-05-14 01:19:25 +02:00
|
|
|
{
|
|
|
|
|
_label = new Label
|
|
|
|
|
{
|
2021-02-21 12:38:56 +01:00
|
|
|
VerticalAlignment = VAlignment.Stretch,
|
2019-05-14 01:19:25 +02:00
|
|
|
Align = Label.AlignMode.Center,
|
|
|
|
|
VAlign = Label.VAlignMode.Center
|
|
|
|
|
};
|
|
|
|
|
_label.AddStyleClass(StyleClassPlaceholderText);
|
|
|
|
|
AddChild(_label);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|