7adf4cc9b5
For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
150 lines
6.2 KiB
XML
150 lines
6.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="EditorProperty" inherits="Container" version="4.0">
|
|
<brief_description>
|
|
Custom control to edit properties for adding into the inspector.
|
|
</brief_description>
|
|
<description>
|
|
This control allows property editing for one or multiple properties into [EditorInspector]. It is added via [EditorInspectorPlugin].
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="_update_property" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
When this virtual function is called, you must update your editor.
|
|
</description>
|
|
</method>
|
|
<method name="add_focusable">
|
|
<return type="void" />
|
|
<argument index="0" name="control" type="Control" />
|
|
<description>
|
|
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.
|
|
</description>
|
|
</method>
|
|
<method name="emit_changed">
|
|
<return type="void" />
|
|
<argument index="0" name="property" type="StringName" />
|
|
<argument index="1" name="value" type="Variant" />
|
|
<argument index="2" name="field" type="StringName" default="&""" />
|
|
<argument index="3" name="changing" type="bool" default="false" />
|
|
<description>
|
|
If one or several properties have changed, this must be called. [code]field[/code] is used in case your editor can modify fields separately (as an example, Vector3.x). The [code]changing[/code] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure).
|
|
</description>
|
|
</method>
|
|
<method name="get_edited_object">
|
|
<return type="Object" />
|
|
<description>
|
|
Gets the edited object.
|
|
</description>
|
|
</method>
|
|
<method name="get_edited_property">
|
|
<return type="StringName" />
|
|
<description>
|
|
Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property.
|
|
</description>
|
|
</method>
|
|
<method name="get_tooltip_text" qualifiers="const">
|
|
<return type="String" />
|
|
<description>
|
|
Override if you want to allow a custom tooltip over your property.
|
|
</description>
|
|
</method>
|
|
<method name="set_bottom_editor">
|
|
<return type="void" />
|
|
<argument index="0" name="editor" type="Control" />
|
|
<description>
|
|
Adds controls with this function if you want them on the bottom (below the label).
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false">
|
|
Used by the inspector, set to [code]true[/code] when the property is checkable.
|
|
</member>
|
|
<member name="checked" type="bool" setter="set_checked" getter="is_checked" default="false">
|
|
Used by the inspector, set to [code]true[/code] when the property is checked.
|
|
</member>
|
|
<member name="deletable" type="bool" setter="set_deletable" getter="is_deletable" default="false">
|
|
Used by the inspector, set to [code]true[/code] when the property can be deleted by the user.
|
|
</member>
|
|
<member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false">
|
|
Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties.
|
|
</member>
|
|
<member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false">
|
|
Used by the inspector, set to [code]true[/code] when the property can add keys for animation.
|
|
</member>
|
|
<member name="label" type="String" setter="set_label" getter="get_label" default="""">
|
|
Set this property to change the label (if you want to show one).
|
|
</member>
|
|
<member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
|
|
Used by the inspector, set to [code]true[/code] when the property is read-only.
|
|
</member>
|
|
</members>
|
|
<signals>
|
|
<signal name="multiple_properties_changed">
|
|
<argument index="0" name="properties" type="PackedStringArray" />
|
|
<argument index="1" name="value" type="Array" />
|
|
<description>
|
|
Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin._parse_property].
|
|
</description>
|
|
</signal>
|
|
<signal name="object_id_selected">
|
|
<argument index="0" name="property" type="StringName" />
|
|
<argument index="1" name="id" type="int" />
|
|
<description>
|
|
Used by sub-inspectors. Emit it if what was selected was an Object ID.
|
|
</description>
|
|
</signal>
|
|
<signal name="property_changed">
|
|
<argument index="0" name="property" type="StringName" />
|
|
<argument index="1" name="value" type="Variant" />
|
|
<description>
|
|
Do not emit this manually, use the [method emit_changed] method instead.
|
|
</description>
|
|
</signal>
|
|
<signal name="property_checked">
|
|
<argument index="0" name="property" type="StringName" />
|
|
<argument index="1" name="bool" type="String" />
|
|
<description>
|
|
Emitted when a property was checked. Used internally.
|
|
</description>
|
|
</signal>
|
|
<signal name="property_deleted">
|
|
<argument index="0" name="property" type="StringName" />
|
|
<description>
|
|
Emitted when a property was deleted. Used internally.
|
|
</description>
|
|
</signal>
|
|
<signal name="property_keyed">
|
|
<argument index="0" name="property" type="StringName" />
|
|
<description>
|
|
Emit it if you want to add this value as an animation key (check for keying being enabled first).
|
|
</description>
|
|
</signal>
|
|
<signal name="property_keyed_with_value">
|
|
<argument index="0" name="property" type="StringName" />
|
|
<argument index="1" name="value" type="Variant" />
|
|
<description>
|
|
Emit it if you want to key a property with a single value.
|
|
</description>
|
|
</signal>
|
|
<signal name="resource_selected">
|
|
<argument index="0" name="path" type="String" />
|
|
<argument index="1" name="resource" type="Resource" />
|
|
<description>
|
|
If you want a sub-resource to be edited, emit this signal with the resource.
|
|
</description>
|
|
</signal>
|
|
<signal name="selected">
|
|
<argument index="0" name="path" type="String" />
|
|
<argument index="1" name="focusable_idx" type="int" />
|
|
<description>
|
|
Emitted when selected. Used internally.
|
|
</description>
|
|
</signal>
|
|
</signals>
|
|
<constants>
|
|
</constants>
|
|
</class>
|