mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-01 09:37:03 +02:00
26 lines
632 B
C#
26 lines
632 B
C#
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.Controls;
|
|
|
|
namespace Robust.Client.ViewVariables.Editors
|
|
{
|
|
internal sealed class VVPropEditorString : VVPropEditor
|
|
{
|
|
protected override Control MakeUI(object? value)
|
|
{
|
|
var lineEdit = new LineEdit
|
|
{
|
|
Text = (string) (value ?? ""),
|
|
Editable = !ReadOnly,
|
|
HorizontalExpand = true,
|
|
};
|
|
|
|
if (!ReadOnly)
|
|
{
|
|
lineEdit.OnTextEntered += e => ValueChanged(e.Text);
|
|
}
|
|
|
|
return lineEdit;
|
|
}
|
|
}
|
|
}
|