s&box docs

public abstract class Editor.ControlWidget : Editor.Widget

A control widget is used to edit the value of a single SerializedProperty.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 19 methods

public virtual void FromClipboardString(string clipboard)

protected virtual Vector2 MinimumSizeHint()

public virtual void OnLabelContextMenu(Editor.ContextMenu menu)

Called when right clicking a label in a ControlSheet for this widget. This allows you to add advanced menu items for this widget at the top of the menu, before the default ones.

protected virtual void OnMultipleDifferentValues(bool state)

protected virtual void OnPaint()

Implementations

protected virtual void OnValueChanged()

protected virtual void PaintControl()

protected virtual void PaintOver()

protected virtual void PaintUnder()

public void Prime()

Should get called right after creation

protected void PropertyFinishEdit()

protected void PropertyStartEdit()

protected virtual Vector2 SizeHint()

public virtual void StartEditing()

Selects this widget and starts editing. Used when we want to focus on the widget in the inspector, like when double-clicking on something in a graph editor that maps to this widget.

public virtual void Think()

public virtual string ToClipboardString()

Properties

Showing 11 properties

public virtual Sandbox.TextFlag Editor.ControlWidget.CellAlignment { get; set; }

If none, when in a grid, the control will fill the entire cell

public virtual bool Editor.ControlWidget.IncludeLabel { get; set; }

If true (default) we'll include a label next to the control

public virtual bool Editor.ControlWidget.IsControlActive { get; set; }

public virtual bool Editor.ControlWidget.IsControlButton { get; set; }

public virtual bool Editor.ControlWidget.IsControlDisabled { get; set; }

public virtual bool Editor.ControlWidget.IsControlHovered { get; set; }

public virtual bool Editor.ControlWidget.IsWideMode { get; set; }

If true we prefer to be full inspector width with the label above us

public virtual bool Editor.ControlWidget.SupportsMultiEdit { get; set; }

protected virtual int Editor.ControlWidget.ValueHash { get; set; }

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.ControlWidget

On this page

Constructorspublic ControlWidget(Sandbox.SerializedProperty property)Methodspublic static Editor.ControlWidget Create(Sandbox.SerializedProperty property)public virtual System.Void FromClipboardString(System.String clipboard)protected virtual Vector2 MinimumSizeHint()protected virtual System.Void OnContextMenu(Editor.ContextMenuEvent e)public virtual System.Void OnLabelContextMenu(Editor.ContextMenu menu)protected virtual System.Void OnMultipleDifferentValues(System.Boolean state)protected virtual System.Void OnPaint()protected virtual System.Void OnValueChanged()protected virtual System.Void PaintControl()protected virtual System.Void PaintOver()protected virtual System.Void PaintUnder()public System.Void Prime()protected System.Void PropertyFinishEdit()protected System.Void PropertyStartEdit()protected virtual Vector2 SizeHint()public virtual System.Void StartEditing()public virtual System.Void Think()public virtual System.String ToClipboardString()public static Editor.ControlWidget TryCreateGenericObjectControlWidget(Sandbox.SerializedProperty property)Propertiespublic virtual Sandbox.TextFlag Editor.ControlWidget.CellAlignment { get; set; }public virtual System.Boolean Editor.ControlWidget.IncludeLabel { get; set; }public virtual System.Boolean Editor.ControlWidget.IsControlActive { get; set; }public virtual System.Boolean Editor.ControlWidget.IsControlButton { get; set; }public virtual System.Boolean Editor.ControlWidget.IsControlDisabled { get; set; }public virtual System.Boolean Editor.ControlWidget.IsControlHovered { get; set; }public virtual System.Boolean Editor.ControlWidget.IsWideMode { get; set; }public Sandbox.SerializedProperty Editor.ControlWidget.SerializedProperty { get; set; }public virtual System.Boolean Editor.ControlWidget.SupportsMultiEdit { get; set; }public Color Editor.ControlWidget.Tint { get; set; }protected virtual System.Int32 Editor.ControlWidget.ValueHash { get; set; }Metadata