class
ControlWidget
public abstract class ControlWidget : Widget A control widget is used to edit the value of a single SerializedProperty.
Constructors
ControlWidget(SerializedProperty property) Properties
| Name | Type | Description |
|---|---|---|
SerializedProperty | SerializedProperty | |
CellAlignment virtual | TextFlag | If none, when in a grid, the control will fill the entire cell |
IsWideMode virtual | Boolean | If true we prefer to be full inspector width with the label above us |
IncludeLabel virtual | Boolean | If true (default) we'll include a label next to the control |
IsControlActive virtual | Boolean | |
IsControlHovered virtual | Boolean | |
IsControlDisabled virtual | Boolean | |
IsControlButton virtual | Boolean | |
Tint | Color | |
SupportsMultiEdit virtual | Boolean |
Methods
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.
static ControlWidget Create(SerializedProperty property) static ControlWidget TryCreateGenericObjectControlWidget(SerializedProperty property) virtual Void Think() Void Prime() Should get called right after creation
virtual Void OnLabelContextMenu(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.
virtual String ToClipboardString() virtual Void FromClipboardString(String clipboard)