More minor UI refactor stuff (#11287)
This commit is contained in:
29
Content.Client/UserInterface/Controls/Placeholder.cs
Normal file
29
Content.Client/UserInterface/Controls/Placeholder.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user