using System; using System.ComponentModel; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; namespace Robust.Client.ViewVariables { /// /// An editor for the value of a property. /// public abstract class ViewVariablesPropertyEditor { /// /// Invoked when the value was changed. /// internal event Action OnValueChanged; protected bool ReadOnly { get; private set; } public Control Initialize(object value, bool readOnly) { ReadOnly = readOnly; return MakeUI(value); } protected abstract Control MakeUI(object value); protected void ValueChanged(object newValue) { OnValueChanged?.Invoke(newValue); } } }