mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
108 lines
8.8 KiB
ReStructuredText
108 lines
8.8 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the EditorInspectorPlugin.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_EditorInspectorPlugin:
|
|
|
|
EditorInspectorPlugin
|
|
=====================
|
|
|
|
**Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Plugin for adding custom property editors on inspector.
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_custom_control<class_EditorInspectorPlugin_method_add_custom_control>` **(** :ref:`Control<class_Control>` control **)** |
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_property_editor<class_EditorInspectorPlugin_method_add_property_editor>` **(** :ref:`String<class_String>` property, :ref:`Control<class_Control>` editor **)** |
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_property_editor_for_multiple_properties<class_EditorInspectorPlugin_method_add_property_editor_for_multiple_properties>` **(** :ref:`String<class_String>` label, :ref:`PoolStringArray<class_PoolStringArray>` properties, :ref:`Control<class_Control>` editor **)** |
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`can_handle<class_EditorInspectorPlugin_method_can_handle>` **(** :ref:`Object<class_Object>` object **)** virtual |
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`parse_begin<class_EditorInspectorPlugin_method_parse_begin>` **(** :ref:`Object<class_Object>` object **)** virtual |
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`parse_category<class_EditorInspectorPlugin_method_parse_category>` **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` category **)** virtual |
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`parse_end<class_EditorInspectorPlugin_method_parse_end>` **(** **)** virtual |
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`parse_property<class_EditorInspectorPlugin_method_parse_property>` **(** :ref:`Object<class_Object>` object, :ref:`int<class_int>` type, :ref:`String<class_String>` path, :ref:`int<class_int>` hint, :ref:`String<class_String>` hint_text, :ref:`int<class_int>` usage **)** virtual |
|
|
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Description
|
|
-----------
|
|
|
|
This plugins allows adding custom property editors to :ref:`EditorInspector<class_EditorInspector>`.
|
|
|
|
Plugins are registered via :ref:`EditorPlugin.add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>`.
|
|
|
|
When an object is edited, the :ref:`can_handle<class_EditorInspectorPlugin_method_can_handle>` function is called and must return true if the object type is supported.
|
|
|
|
If supported, the function :ref:`parse_begin<class_EditorInspectorPlugin_method_parse_begin>` will be called, allowing to place custom controls at the beginning of the class.
|
|
|
|
Subsequently, the :ref:`parse_category<class_EditorInspectorPlugin_method_parse_category>` and :ref:`parse_property<class_EditorInspectorPlugin_method_parse_property>` are called for every category and property. They offer the ability to add custom controls to the inspector too.
|
|
|
|
Finally :ref:`parse_end<class_EditorInspectorPlugin_method_parse_end>` will be called.
|
|
|
|
On each of these calls, the "add" functions can be called.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_EditorInspectorPlugin_method_add_custom_control:
|
|
|
|
- void **add_custom_control** **(** :ref:`Control<class_Control>` control **)**
|
|
|
|
Add a custom control, not necesarily a property editor.
|
|
|
|
.. _class_EditorInspectorPlugin_method_add_property_editor:
|
|
|
|
- void **add_property_editor** **(** :ref:`String<class_String>` property, :ref:`Control<class_Control>` editor **)**
|
|
|
|
Add a property editor, this must inherit :ref:`EditorProperty<class_EditorProperty>`.
|
|
|
|
.. _class_EditorInspectorPlugin_method_add_property_editor_for_multiple_properties:
|
|
|
|
- void **add_property_editor_for_multiple_properties** **(** :ref:`String<class_String>` label, :ref:`PoolStringArray<class_PoolStringArray>` properties, :ref:`Control<class_Control>` editor **)**
|
|
|
|
Add am editor that allows modifying multiple properties, this must inherit :ref:`EditorProperty<class_EditorProperty>`.
|
|
|
|
.. _class_EditorInspectorPlugin_method_can_handle:
|
|
|
|
- :ref:`bool<class_bool>` **can_handle** **(** :ref:`Object<class_Object>` object **)** virtual
|
|
|
|
Return true if this object can be handled by this plugin.
|
|
|
|
.. _class_EditorInspectorPlugin_method_parse_begin:
|
|
|
|
- void **parse_begin** **(** :ref:`Object<class_Object>` object **)** virtual
|
|
|
|
Called to allow adding controls at the beginning of the list.
|
|
|
|
.. _class_EditorInspectorPlugin_method_parse_category:
|
|
|
|
- void **parse_category** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` category **)** virtual
|
|
|
|
Called to allow adding controls at the beginning of the category.
|
|
|
|
.. _class_EditorInspectorPlugin_method_parse_end:
|
|
|
|
- void **parse_end** **(** **)** virtual
|
|
|
|
Called to allow adding controls at the end of the list.
|
|
|
|
.. _class_EditorInspectorPlugin_method_parse_property:
|
|
|
|
- :ref:`bool<class_bool>` **parse_property** **(** :ref:`Object<class_Object>` object, :ref:`int<class_int>` type, :ref:`String<class_String>` path, :ref:`int<class_int>` hint, :ref:`String<class_String>` hint_text, :ref:`int<class_int>` usage **)** virtual
|
|
|
|
Called to allow adding property specific editors to the inspector. Usually these inherit :ref:`EditorProperty<class_EditorProperty>`
|
|
|