EditorProperty
Custom control for editing properties that can be added to the EditorInspector.
Custom control for editing properties that can be added to the EditorInspector.
A custom control for editing properties that can be added to the EditorInspector. It is added via EditorInspectorPlugin.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
EditorPropertyConstructor
public EditorProperty();Properties12
CheckableProperty
public bool Checkable { get; set; }Used by the inspector, set to true when the property is checkable.
CheckedProperty
public bool Checked { get; set; }Used by the inspector, set to true when the property is checked.
DeletableProperty
public bool Deletable { get; set; }Used by the inspector, set to true when the property can be deleted by the user.
DrawBackgroundProperty
public bool DrawBackground { get; set; }Used by the inspector, set to true when the property background is drawn.
DrawLabelProperty
public bool DrawLabel { get; set; }Used by the inspector, set to true when the property label is drawn.
DrawWarningProperty
public bool DrawWarning { get; set; }Used by the inspector, set to true when the property is drawn with the editor theme's warning color. This is used for editable children's properties.
KeyingProperty
public bool Keying { get; set; }Used by the inspector, set to true when the property can add keys for animation.
LabelProperty
public string Label { get; set; }Set this property to change the label (if you want to show one).
NameSplitRatioProperty
public float NameSplitRatio { get; set; }Space distribution ratio between the label and the editing field.
ReadOnlyProperty
public bool ReadOnly { get; set; }Used by the inspector, set to true when the property is read-only.
SelectableProperty
public bool Selectable { get; set; }Used by the inspector, set to true when the property is selectable.
UseFoldingProperty
public bool UseFolding { get; set; }Used by the inspector, set to true when the property is using folding.
Methods37
AddFocusablevoid
public void AddFocusable(Control control);If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed.
| Name | Type | Default |
|---|---|---|
control | Control | — |
Deselectvoid
public void Deselect();Draw property as not selected. Used by the inspector.
EmitChangedvoid
public void EmitChanged(StringName property, Variant value, StringName field = null, bool changing = false);Reports a user edit to Inspector. Do not replace with direct assignment when editor change handling and Undo/Redo are needed. Do not call merely to refresh a widget from model data.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
value | Variant | — |
field | StringName | null |
changing | bool | false |
propertyChanged property name, normally GetEditedProperty().
valueNew Variant-compatible value, not the widget itself.
fieldOptional subcomponent name; the example leaves it empty for a whole-property edit.
changingContinuous-change flag, such as while typing. The completed numeric-step example uses false; drag gestures were not tested.
GetEditedObjectReckfellObject
public ReckfellObject GetEditedObject();Reads the object assigned to this EditorProperty by Inspector. Check for an object before Get during initialization or selection changes.
ReckfellObjectCurrent ReckfellObject or null. The check returned the DocsInspectorSettings opened in the main Inspector.
GetEditedPropertyStringName
public StringName GetEditedProperty();Reads the property name bound to this widget by Inspector. Use for Get and EmitChanged rather than hardcoding another field.
StringNameBound-property StringName; Amount was checked. Distinct from display Label.
GetLabelstring
public string GetLabel();stringGetNameSplitRatiofloat
public float GetNameSplitRatio();floatIsCheckablebool
public bool IsCheckable();boolIsCheckedbool
public bool IsChecked();boolIsDeletablebool
public bool IsDeletable();boolIsDrawBackgroundbool
public bool IsDrawBackground();boolIsDrawLabelbool
public bool IsDrawLabel();boolIsDrawWarningbool
public bool IsDrawWarning();boolIsKeyingbool
public bool IsKeying();boolIsReadOnlybool
public bool IsReadOnly();boolIsSelectablebool
public bool IsSelectable();boolIsSelectedbool
public bool IsSelected();Returns true if property is drawn as selected. Used by the inspector.
boolIsUsingFoldingbool
public bool IsUsingFolding();boolSelectvoid
public void Select(int focusable = -1);Draw property as selected. Used by the inspector.
| Name | Type | Default |
|---|---|---|
focusable | int | -1 |
SetBottomEditorvoid
public void SetBottomEditor(Control editor);Puts the editor control below the property label. The control must be previously added using Entity.AddChild.
| Name | Type | Default |
|---|---|---|
editor | Control | — |
SetCheckablevoid
public void SetCheckable(bool checkable);| Name | Type | Default |
|---|---|---|
checkable | bool | — |
SetCheckedvoid
public void SetChecked(bool @checked);| Name | Type | Default |
|---|---|---|
checked | bool | — |
SetDeletablevoid
public void SetDeletable(bool deletable);| Name | Type | Default |
|---|---|---|
deletable | bool | — |
SetDrawBackgroundvoid
public void SetDrawBackground(bool drawBackground);| Name | Type | Default |
|---|---|---|
drawBackground | bool | — |
SetDrawLabelvoid
public void SetDrawLabel(bool drawLabel);| Name | Type | Default |
|---|---|---|
drawLabel | bool | — |
SetDrawWarningvoid
public void SetDrawWarning(bool drawWarning);| Name | Type | Default |
|---|---|---|
drawWarning | bool | — |
SetKeyingvoid
public void SetKeying(bool keying);| Name | Type | Default |
|---|---|---|
keying | bool | — |
SetLabelvoid
public void SetLabel(string text);| Name | Type | Default |
|---|---|---|
text | string | — |
SetLabelReferencevoid
public void SetLabelReference(Control control);Used by the inspector, set to a control that will be used as a reference to calculate the size of the label.
| Name | Type | Default |
|---|---|---|
control | Control | — |
SetNameSplitRatiovoid
public void SetNameSplitRatio(float ratio);| Name | Type | Default |
|---|---|---|
ratio | float | — |
SetObjectAndPropertyvoid
public void SetObjectAndProperty(ReckfellObject @object, StringName property);Assigns object and property to edit.
| Name | Type | Default |
|---|---|---|
object | ReckfellObject | — |
property | StringName | — |
SetReadOnlyvoid
public void SetReadOnly(bool readOnly);Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state.
| Name | Type | Default |
|---|---|---|
readOnly | bool | — |
SetSelectablevoid
public void SetSelectable(bool selectable);| Name | Type | Default |
|---|---|---|
selectable | bool | — |
SetUseFoldingvoid
public void SetUseFolding(bool useFolding);| Name | Type | Default |
|---|---|---|
useFolding | bool | — |
UpdatePropertyvoid
public void UpdateProperty();When this virtual function is called, you must update your editor.
_SetReadOnlyvoid
public virtual void _SetReadOnly(bool readOnly);Callback for synchronizing custom controls with read-only mode. Appearance alone is insufficient: also guard the handler that emits changes.
| Name | Type | Default |
|---|---|---|
readOnly | bool | — |
readOnlytrue disables editing through your UI; false restores ordinary editing.
_UpdatePropertyvoid
public virtual void _UpdateProperty();Refreshes UI from current model state. Read GetEditedObject/GetEditedProperty and update without an edit signal; the example uses SetValueNoSignal.
Signals and events13
MultiplePropertiesChangedEvent
public event EditorProperty.MultiplePropertiesChangedEventHandler MultiplePropertiesChanged;Emit it if you want multiple properties modified at the same time. Do not use if added via EditorInspectorPlugin._ParseProperty.
| Name | Type | Default |
|---|---|---|
properties | string[] | — |
value | Reckfell.Collections.Array | — |
ObjectIdSelectedEvent
public event EditorProperty.ObjectIdSelectedEventHandler ObjectIdSelected;Used by sub-inspectors. Emit it if what was selected was an Object ID.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
id | long | — |
PropertyCanRevertChangedEvent
public event EditorProperty.PropertyCanRevertChangedEventHandler PropertyCanRevertChanged;Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
canRevert | bool | — |
PropertyChangedEvent
public event EditorProperty.PropertyChangedEventHandler PropertyChanged;Do not emit this manually, use the EditorProperty.EmitChanged method instead.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
value | Variant | — |
field | StringName | — |
changing | bool | — |
PropertyCheckedEvent
public event EditorProperty.PropertyCheckedEventHandler PropertyChecked;Emitted when a property was checked. Used internally.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
checked | bool | — |
PropertyDeletedEvent
public event EditorProperty.PropertyDeletedEventHandler PropertyDeleted;Emitted when a property was deleted. Used internally.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
PropertyFavoritedEvent
public event EditorProperty.PropertyFavoritedEventHandler PropertyFavorited;Emit it if you want to mark a property as favorited, making it appear at the top of the inspector.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
favorited | bool | — |
PropertyKeyedEvent
public event EditorProperty.PropertyKeyedEventHandler PropertyKeyed;Emit it if you want to add this value as an animation key (check for keying being enabled first).
| Name | Type | Default |
|---|---|---|
property | StringName | — |
PropertyKeyedWithValueEvent
public event EditorProperty.PropertyKeyedWithValueEventHandler PropertyKeyedWithValue;Emit it if you want to key a property with a single value.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
value | Variant | — |
PropertyOverriddenEvent
public event Action PropertyOverridden;Emitted when a setting override for the current project is requested.
PropertyPinnedEvent
public event EditorProperty.PropertyPinnedEventHandler PropertyPinned;Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value. The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
pinned | bool | — |
ResourceSelectedEvent
public event EditorProperty.ResourceSelectedEventHandler ResourceSelected;If you want a sub-resource to be edited, emit this signal with the resource.
| Name | Type | Default |
|---|---|---|
path | string | — |
resource | Resource | — |
SelectedEvent
public event EditorProperty.SelectedEventHandler Selected;Emitted when selected. Used internally.
| Name | Type | Default |
|---|---|---|
path | string | — |
focusableIdx | long | — |