mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-02 18:17:09 +02:00
RobustToolbox projects should be named Robust.* This PR changes the RobustToolbox projects from SS14.* to Robust.* Updates SS14.* prefixes/namespaces to Robust.* Updates SpaceStation14.sln to RobustToolbox.sln Updates MSBUILD/SS14.* to MSBUILD/Robust.* Updates CSProject and MSBuild references for the above Updates git_helper.py Removes Runserver and Runclient as they are unusable
34 lines
854 B
C#
34 lines
854 B
C#
using System;
|
|
using System.ComponentModel;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.Controls;
|
|
|
|
namespace Robust.Client.ViewVariables
|
|
{
|
|
/// <summary>
|
|
/// An editor for the value of a property.
|
|
/// </summary>
|
|
public abstract class ViewVariablesPropertyEditor
|
|
{
|
|
/// <summary>
|
|
/// Invoked when the value was changed.
|
|
/// </summary>
|
|
internal event Action<object> 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);
|
|
}
|
|
}
|
|
}
|