EditorInspector.xml 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="EditorInspector" inherits="ScrollContainer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. A control used to edit properties of an object.
  5. </brief_description>
  6. <description>
  7. This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the [EditorInspector] used in the editor's Inspector dock, use [method EditorInterface.get_inspector].
  8. [EditorInspector] will show properties in the same order as the array returned by [method Object.get_property_list].
  9. If a property's name is path-like (i.e. if it contains forward slashes), [EditorInspector] will create nested sections for "directories" along the path. For example, if a property is named [code]highlighting/gdscript/node_path_color[/code], it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section.
  10. If a property has [constant @GlobalScope.PROPERTY_USAGE_GROUP] usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. [EditorInspector] will create a top-level section for each group. For example, if a property with group usage is named [code]Collide With[/code] and its hint string is [code]collide_with_[/code], a subsequent [code]collide_with_area[/code] property will be shown as "Area" inside the "Collide With" section.
  11. [b]Note:[/b] Unlike sections created from path-like property names, [EditorInspector] won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names.
  12. </description>
  13. <tutorials>
  14. </tutorials>
  15. <methods>
  16. <method name="get_edited_object">
  17. <return type="Object" />
  18. <description>
  19. Returns the object currently selected in this inspector.
  20. </description>
  21. </method>
  22. <method name="refresh">
  23. <return type="void" />
  24. <description>
  25. Refreshes the inspector.
  26. [b]Note:[/b] To save on CPU resources, calling this method will do nothing if the time specified in [code]docks/property_editor/auto_refresh_interval[/code] editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.)
  27. </description>
  28. </method>
  29. </methods>
  30. <members>
  31. <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" overrides="ScrollContainer" default="false" />
  32. </members>
  33. <signals>
  34. <signal name="object_id_selected">
  35. <argument index="0" name="id" type="int" />
  36. <description>
  37. Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector.
  38. </description>
  39. </signal>
  40. <signal name="property_edited">
  41. <argument index="0" name="property" type="String" />
  42. <description>
  43. Emitted when a property is edited in the inspector.
  44. </description>
  45. </signal>
  46. <signal name="property_keyed">
  47. <argument index="0" name="property" type="String" />
  48. <description>
  49. Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled.
  50. </description>
  51. </signal>
  52. <signal name="property_selected">
  53. <argument index="0" name="property" type="String" />
  54. <description>
  55. Emitted when a property is selected in the inspector.
  56. </description>
  57. </signal>
  58. <signal name="property_toggled">
  59. <argument index="0" name="property" type="String" />
  60. <argument index="1" name="checked" type="bool" />
  61. <description>
  62. Emitted when a boolean property is toggled in the inspector.
  63. [b]Note:[/b] This signal is never emitted if the internal [code]autoclear[/code] property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself.
  64. </description>
  65. </signal>
  66. <signal name="resource_selected">
  67. <argument index="0" name="res" type="Object" />
  68. <argument index="1" name="prop" type="String" />
  69. <description>
  70. Emitted when a resource is selected in the inspector.
  71. </description>
  72. </signal>
  73. <signal name="restart_requested">
  74. <description>
  75. Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings.
  76. </description>
  77. </signal>
  78. </signals>
  79. <constants>
  80. </constants>
  81. </class>