using System; using Robust.Client.UserInterface; namespace Robust.Client.ViewVariables { /// /// An editor for the value of a property. /// public abstract class VVPropEditor { /// /// 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, bool reinterpretValue = false) { OnValueChanged?.Invoke(newValue, reinterpretValue); } public virtual void WireNetworkSelector(uint sessionId, object[] selectorChain) { } } }