2018-05-28 20:53:15 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2020-02-01 09:03:48 +08:00
<class name= "EditorProperty" inherits= "Container" version= "4.0" >
2018-05-28 20:53:15 +08:00
<brief_description >
2019-06-22 07:04:47 +08:00
Custom control to edit properties for adding into the inspector.
2018-05-28 20:53:15 +08:00
</brief_description>
<description >
2019-04-24 03:39:09 +08:00
This control allows property editing for one or multiple properties into [EditorInspector]. It is added via [EditorInspectorPlugin].
2018-05-28 20:53:15 +08:00
</description>
<tutorials >
</tutorials>
<methods >
2019-04-24 03:39:09 +08:00
<method name= "add_focusable" >
<return type= "void" >
</return>
<argument index= "0" name= "control" type= "Control" >
</argument>
<description >
2019-04-24 13:49:38 +08:00
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.
2019-04-24 03:39:09 +08:00
</description>
</method>
2019-01-27 05:21:53 +08:00
<method name= "emit_changed" >
<return type= "void" >
</return>
2020-02-22 21:59:09 +08:00
<argument index= "0" name= "property" type= "StringName" >
2019-01-27 05:21:53 +08:00
</argument>
<argument index= "1" name= "value" type= "Variant" >
</argument>
2020-02-22 21:59:09 +08:00
<argument index= "2" name= "field" type= "StringName" default= "@""" >
2019-01-27 05:21:53 +08:00
</argument>
<argument index= "3" name= "changing" type= "bool" default= "false" >
</argument>
<description >
2019-06-22 07:04:47 +08:00
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).
2019-01-27 05:21:53 +08:00
</description>
</method>
2018-05-28 20:53:15 +08:00
<method name= "get_edited_object" >
<return type= "Object" >
</return>
<description >
2019-06-22 07:04:47 +08:00
Gets the edited object.
2018-05-28 20:53:15 +08:00
</description>
</method>
<method name= "get_edited_property" >
2020-02-22 21:59:09 +08:00
<return type= "StringName" >
2018-05-28 20:53:15 +08:00
</return>
<description >
2019-06-22 07:04:47 +08:00
Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property.
2018-05-28 20:53:15 +08:00
</description>
</method>
2018-07-26 17:56:21 +08:00
<method name= "get_tooltip_text" qualifiers= "const" >
<return type= "String" >
</return>
<description >
2019-04-24 03:39:09 +08:00
Override if you want to allow a custom tooltip over your property.
</description>
</method>
<method name= "set_bottom_editor" >
<return type= "void" >
</return>
<argument index= "0" name= "editor" type= "Control" >
</argument>
<description >
2019-06-22 07:04:47 +08:00
Adds controls with this function if you want them on the bottom (below the label).
2018-07-26 17:56:21 +08:00
</description>
</method>
2018-05-28 20:53:15 +08:00
<method name= "update_property" qualifiers= "virtual" >
<return type= "void" >
</return>
<description >
2019-04-24 03:39:09 +08:00
When this virtual function is called, you must update your editor.
2018-05-28 20:53:15 +08:00
</description>
</method>
</methods>
<members >
2019-06-29 18:38:01 +08:00
<member name= "checkable" type= "bool" setter= "set_checkable" getter= "is_checkable" default= "false" >
2020-07-18 23:17:00 +08:00
Used by the inspector, set to [code]true[/code] when the property is checkable.
2018-05-28 20:53:15 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "checked" type= "bool" setter= "set_checked" getter= "is_checked" default= "false" >
2020-07-18 23:17:00 +08:00
Used by the inspector, set to [code]true[/code] when the property is checked.
2018-05-28 20:53:15 +08:00
</member>
2020-04-20 17:48:00 +08:00
<member name= "deletable" type= "bool" setter= "set_deletable" getter= "is_deletable" default= "false" >
2020-07-18 23:17:00 +08:00
Used by the inspector, set to [code]true[/code] when the property can be deleted by the user.
2020-04-20 17:48:00 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "draw_red" type= "bool" setter= "set_draw_red" getter= "is_draw_red" default= "false" >
2020-07-18 23:17:00 +08:00
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.
2018-05-28 20:53:15 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "keying" type= "bool" setter= "set_keying" getter= "is_keying" default= "false" >
2020-07-18 23:17:00 +08:00
Used by the inspector, set to [code]true[/code] when the property can add keys for animation.
2018-05-28 20:53:15 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "label" type= "String" setter= "set_label" getter= "get_label" default= """" >
2020-07-18 23:17:00 +08:00
Set this property to change the label (if you want to show one).
2018-05-28 20:53:15 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "read_only" type= "bool" setter= "set_read_only" getter= "is_read_only" default= "false" >
2020-07-18 23:17:00 +08:00
Used by the inspector, set to [code]true[/code] when the property is read-only.
2018-05-28 20:53:15 +08:00
</member>
</members>
<signals >
<signal name= "multiple_properties_changed" >
2020-02-18 20:59:24 +08:00
<argument index= "0" name= "properties" type= "PackedStringArray" >
2018-05-28 20:53:15 +08:00
</argument>
<argument index= "1" name= "value" type= "Array" >
</argument>
<description >
2019-06-22 07:04:47 +08:00
Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin.parse_property].
2018-05-28 20:53:15 +08:00
</description>
</signal>
<signal name= "object_id_selected" >
2020-02-22 21:59:09 +08:00
<argument index= "0" name= "property" type= "StringName" >
2018-05-28 20:53:15 +08:00
</argument>
<argument index= "1" name= "id" type= "int" >
</argument>
<description >
2019-06-22 07:04:47 +08:00
Used by sub-inspectors. Emit it if what was selected was an Object ID.
2018-05-28 20:53:15 +08:00
</description>
</signal>
<signal name= "property_changed" >
2020-02-22 21:59:09 +08:00
<argument index= "0" name= "property" type= "StringName" >
2018-05-28 20:53:15 +08:00
</argument>
2020-01-26 22:18:06 +08:00
<argument index= "1" name= "value" type= "Variant" >
2018-05-28 20:53:15 +08:00
</argument>
<description >
2019-04-24 03:39:09 +08:00
Do not emit this manually, use the [method emit_changed] method instead.
2018-05-28 20:53:15 +08:00
</description>
</signal>
<signal name= "property_checked" >
2020-02-22 21:59:09 +08:00
<argument index= "0" name= "property" type= "StringName" >
2018-05-28 20:53:15 +08:00
</argument>
<argument index= "1" name= "bool" type= "String" >
</argument>
<description >
2019-06-22 07:04:47 +08:00
Emitted when a property was checked. Used internally.
2018-05-28 20:53:15 +08:00
</description>
</signal>
2020-04-20 17:48:00 +08:00
<signal name= "property_deleted" >
<argument index= "0" name= "property" type= "StringName" >
</argument>
<description >
2020-07-18 23:17:00 +08:00
Emitted when a property was deleted. Used internally.
2020-04-20 17:48:00 +08:00
</description>
</signal>
2018-05-28 20:53:15 +08:00
<signal name= "property_keyed" >
2020-02-22 21:59:09 +08:00
<argument index= "0" name= "property" type= "StringName" >
2018-05-28 20:53:15 +08:00
</argument>
<description >
2019-06-22 07:04:47 +08:00
Emit it if you want to add this value as an animation key (check for keying being enabled first).
2018-05-28 20:53:15 +08:00
</description>
</signal>
<signal name= "property_keyed_with_value" >
2020-02-22 21:59:09 +08:00
<argument index= "0" name= "property" type= "StringName" >
2018-05-28 20:53:15 +08:00
</argument>
2020-01-26 22:18:06 +08:00
<argument index= "1" name= "value" type= "Variant" >
2018-05-28 20:53:15 +08:00
</argument>
<description >
2019-06-22 07:04:47 +08:00
Emit it if you want to key a property with a single value.
2018-05-28 20:53:15 +08:00
</description>
</signal>
<signal name= "resource_selected" >
<argument index= "0" name= "path" type= "String" >
</argument>
2018-09-01 03:12:35 +08:00
<argument index= "1" name= "resource" type= "Resource" >
2018-05-28 20:53:15 +08:00
</argument>
<description >
2019-04-24 03:39:09 +08:00
If you want a sub-resource to be edited, emit this signal with the resource.
2018-05-28 20:53:15 +08:00
</description>
</signal>
<signal name= "selected" >
<argument index= "0" name= "path" type= "String" >
</argument>
<argument index= "1" name= "focusable_idx" type= "int" >
</argument>
<description >
2019-06-22 07:04:47 +08:00
Emitted when selected. Used internally.
2018-05-28 20:53:15 +08:00
</description>
</signal>
</signals>
<constants >
</constants>
</class>