EditorProperty

    Custom control to edit properties for adding into the inspector.

    This control allows property editing for one or multiple properties into . It is added via EditorInspectorPlugin.

    Properties

    void ( Control control )
    void ( String property, value, String field=””, changing=false )
    Object ( )
    String ( )
    String ( ) const
    voidset_bottom_editor ( editor )
    voidupdate_property ( ) virtual

    Signals

    • multiple_properties_changed ( properties, Array value )

    Emit it if you want multiple properties modified at the same time. Do not use if added via .


    • object_id_selected ( String property, id )

    Used by sub-inspectors. Emit it if what was selected was an Object ID.


    Do not emit this manually, use the emit_changed method instead.


    • property_checked ( property, String bool )

    Emitted when a property was checked. Used internally.


    • property_keyed ( property )

    Emit it if you want to add this value as an animation key (check for keying being enabled first).


    • property_keyed_with_value ( String property, value )

    • resource_selected ( String path, resource )

    If you want a sub-resource to be edited, emit this signal with the resource.


    • selected ( String path, focusable_idx )

    Emitted when selected. Used internally.

    Used by the inspector, set to true when the property is checkable.


    • checked
    Defaultfalse
    Setterset_checked(value)
    Getteris_checked()

    Used by the inspector, set to true when the property is checked.


    Used by the inspector, set to true when the property must draw with error color. This is used for editable children’s properties.


    Default
    Setterset_keying(value)
    Getteris_keying()

    Used by the inspector, set to true when the property can add keys for animation.


    • label

    Set this property to change the label (if you want to show one).


    Defaultfalse
    Setterset_read_only(value)
    Getteris_read_only()

    Method Descriptions

    • void add_focusable ( 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.


    • void emit_changed ( String property, value, String field=””, changing=false )

    If one or several properties have changed, this must be called. field is used in case your editor can modify fields separately (as an example, Vector3.x). The argument avoids the editor requesting this property to be refreshed (leave as false if unsure).


    Gets the edited object.


    • get_edited_property ( )

    Gets the edited property. If your editor is for a single property (added via EditorInspectorPlugin.parse_property), then this will return the property.


    • get_tooltip_text ( ) const

    Override if you want to allow a custom tooltip over your property.


    • void set_bottom_editor ( Control editor )

    Adds controls with this function if you want them on the bottom (below the label).


    When this virtual function is called, you must update your editor.