2018-05-28 12:53:15 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "EditorProperty" inherits= "Container" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2018-05-28 12:53:15 +00:00
<brief_description >
2023-04-30 14:26:09 +00:00
Custom control for editing properties that can be added to the [EditorInspector].
2018-05-28 12:53:15 +00:00
</brief_description>
<description >
2023-04-30 14:26:09 +00:00
A custom control for editing properties that can be added to the [EditorInspector]. It is added via [EditorInspectorPlugin].
2018-05-28 12:53:15 +00:00
</description>
<tutorials >
</tutorials>
<methods >
2022-09-18 23:21:55 +00:00
<method name= "_set_read_only" qualifiers= "virtual" >
<return type= "void" />
<param index= "0" name= "read_only" type= "bool" />
<description >
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.
</description>
</method>
2021-05-15 21:48:59 +00:00
<method name= "_update_property" qualifiers= "virtual" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-05-15 21:48:59 +00:00
<description >
When this virtual function is called, you must update your editor.
</description>
</method>
2019-04-23 19:39:09 +00:00
<method name= "add_focusable" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "control" type= "Control" />
2019-04-23 19:39:09 +00:00
<description >
2019-04-24 05:49:38 +00: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-23 19:39:09 +00:00
</description>
</method>
2019-01-26 21:21:53 +00:00
<method name= "emit_changed" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
<param index= "1" name= "value" type= "Variant" />
<param index= "2" name= "field" type= "StringName" default= "&""" />
<param index= "3" name= "changing" type= "bool" default= "false" />
2019-01-26 21:21:53 +00:00
<description >
2022-08-12 16:07:53 +00:00
If one or several properties have changed, this must be called. [param field] is used in case your editor can modify fields separately (as an example, Vector3.x). The [param changing] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure).
2019-01-26 21:21:53 +00:00
</description>
</method>
2018-05-28 12:53:15 +00:00
<method name= "get_edited_object" >
2021-07-30 13:28:05 +00:00
<return type= "Object" />
2018-05-28 12:53:15 +00:00
<description >
2019-06-21 23:04:47 +00:00
Gets the edited object.
2018-05-28 12:53:15 +00:00
</description>
</method>
2022-06-18 22:42:02 +00:00
<method name= "get_edited_property" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "StringName" />
2018-05-28 12:53:15 +00:00
<description >
2021-05-15 21:48:59 +00: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 12:53:15 +00:00
</description>
2019-04-23 19:39:09 +00:00
</method>
<method name= "set_bottom_editor" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "editor" type= "Control" />
2019-04-23 19:39:09 +00:00
<description >
2022-08-12 16:07:53 +00:00
Puts the [param editor] control below the property label. The control must be previously added using [method Node.add_child].
2018-07-26 09:56:21 +00:00
</description>
</method>
2021-08-22 01:52:44 +00:00
<method name= "update_property" >
<return type= "void" />
<description >
2022-10-06 19:59:48 +00:00
Forces refresh of the property display.
2021-08-22 01:52:44 +00:00
</description>
</method>
2018-05-28 12:53:15 +00:00
</methods>
<members >
2019-06-29 10:38:01 +00:00
<member name= "checkable" type= "bool" setter= "set_checkable" getter= "is_checkable" default= "false" >
2020-07-18 15:17:00 +00:00
Used by the inspector, set to [code]true[/code] when the property is checkable.
2018-05-28 12:53:15 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "checked" type= "bool" setter= "set_checked" getter= "is_checked" default= "false" >
2020-07-18 15:17:00 +00:00
Used by the inspector, set to [code]true[/code] when the property is checked.
2018-05-28 12:53:15 +00:00
</member>
2020-04-20 09:48:00 +00:00
<member name= "deletable" type= "bool" setter= "set_deletable" getter= "is_deletable" default= "false" >
2020-07-18 15:17:00 +00:00
Used by the inspector, set to [code]true[/code] when the property can be deleted by the user.
2020-04-20 09:48:00 +00:00
</member>
2021-09-30 15:08:04 +00:00
<member name= "draw_warning" type= "bool" setter= "set_draw_warning" getter= "is_draw_warning" default= "false" >
Used by the inspector, set to [code]true[/code] when the property is drawn with the editor theme's warning color. This is used for editable children's properties.
2018-05-28 12:53:15 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "keying" type= "bool" setter= "set_keying" getter= "is_keying" default= "false" >
2020-07-18 15:17:00 +00:00
Used by the inspector, set to [code]true[/code] when the property can add keys for animation.
2018-05-28 12:53:15 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "label" type= "String" setter= "set_label" getter= "get_label" default= """" >
2020-07-18 15:17:00 +00:00
Set this property to change the label (if you want to show one).
2018-05-28 12:53:15 +00:00
</member>
2024-02-21 17:51:08 +00:00
<member name= "read_only" type= "bool" setter= "set_read_only" getter= "is_read_only" default= "false" keywords= "enabled, disabled, editable" >
2020-07-18 15:17:00 +00:00
Used by the inspector, set to [code]true[/code] when the property is read-only.
2018-05-28 12:53:15 +00:00
</member>
</members>
<signals >
<signal name= "multiple_properties_changed" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "properties" type= "PackedStringArray" />
<param index= "1" name= "value" type= "Array" />
2018-05-28 12:53:15 +00:00
<description >
2021-05-15 21:48:59 +00: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 12:53:15 +00:00
</description>
</signal>
<signal name= "object_id_selected" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
<param index= "1" name= "id" type= "int" />
2018-05-28 12:53:15 +00:00
<description >
2019-06-21 23:04:47 +00:00
Used by sub-inspectors. Emit it if what was selected was an Object ID.
2018-05-28 12:53:15 +00:00
</description>
</signal>
2022-07-30 13:12:51 +00:00
<signal name= "property_can_revert_changed" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
<param index= "1" name= "can_revert" type= "bool" />
2022-07-30 13:12:51 +00:00
<description >
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.
</description>
</signal>
2018-05-28 12:53:15 +00:00
<signal name= "property_changed" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
<param index= "1" name= "value" type= "Variant" />
2022-08-29 22:27:43 +00:00
<param index= "2" name= "field" type= "StringName" />
<param index= "3" name= "changing" type= "bool" />
2018-05-28 12:53:15 +00:00
<description >
2019-04-23 19:39:09 +00:00
Do not emit this manually, use the [method emit_changed] method instead.
2018-05-28 12:53:15 +00:00
</description>
</signal>
<signal name= "property_checked" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
<param index= "1" name= "checked" type= "bool" />
2018-05-28 12:53:15 +00:00
<description >
2019-06-21 23:04:47 +00:00
Emitted when a property was checked. Used internally.
2018-05-28 12:53:15 +00:00
</description>
</signal>
2020-04-20 09:48:00 +00:00
<signal name= "property_deleted" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
2020-04-20 09:48:00 +00:00
<description >
2020-07-18 15:17:00 +00:00
Emitted when a property was deleted. Used internally.
2020-04-20 09:48:00 +00:00
</description>
</signal>
2018-05-28 12:53:15 +00:00
<signal name= "property_keyed" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
2018-05-28 12:53:15 +00:00
<description >
2019-06-21 23:04:47 +00:00
Emit it if you want to add this value as an animation key (check for keying being enabled first).
2018-05-28 12:53:15 +00:00
</description>
</signal>
<signal name= "property_keyed_with_value" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
<param index= "1" name= "value" type= "Variant" />
2018-05-28 12:53:15 +00:00
<description >
2019-06-21 23:04:47 +00:00
Emit it if you want to key a property with a single value.
2018-05-28 12:53:15 +00:00
</description>
</signal>
2021-10-26 19:12:25 +00:00
<signal name= "property_pinned" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "property" type= "StringName" />
<param index= "1" name= "pinned" type= "bool" />
2021-10-26 19:12:25 +00:00
<description >
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.
2022-11-15 23:13:39 +00:00
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.
2021-10-26 19:12:25 +00:00
</description>
</signal>
2018-05-28 12:53:15 +00:00
<signal name= "resource_selected" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "path" type= "String" />
<param index= "1" name= "resource" type= "Resource" />
2018-05-28 12:53:15 +00:00
<description >
2019-04-23 19:39:09 +00:00
If you want a sub-resource to be edited, emit this signal with the resource.
2018-05-28 12:53:15 +00:00
</description>
</signal>
<signal name= "selected" >
2022-08-06 18:11:48 +00:00
<param index= "0" name= "path" type= "String" />
<param index= "1" name= "focusable_idx" type= "int" />
2018-05-28 12:53:15 +00:00
<description >
2019-06-21 23:04:47 +00:00
Emitted when selected. Used internally.
2018-05-28 12:53:15 +00:00
</description>
</signal>
</signals>
</class>