summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-07-22 12:37:33 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-07-22 12:37:33 +0200
commit5b20b49bf721185f05d2881dc04884eb7ffc2b6e (patch)
tree88ca08004503d1574c23fefba6b88e6ba2e0a434
parent07e289963ce4b1bcdd02d9259991ec29b9f036e1 (diff)
doc: Formatting fixes in EditorPlugin docs
-rw-r--r--doc/classes/EditorPlugin.xml66
1 files changed, 28 insertions, 38 deletions
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index c1c3008b5d..9d3fec69b9 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -29,7 +29,7 @@
<argument index="1" name="title" type="String">
</argument>
<description>
- Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [code]queue_free()[/code].
+ Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
</description>
</method>
<method name="add_control_to_container">
@@ -40,9 +40,9 @@
<argument index="1" name="control" type="Control">
</argument>
<description>
- Adds a custom control to a container (see [code]CONTAINER_*[/code] enum). There are many locations where custom controls can be added in the editor UI.
+ Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.
Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
- When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [code]queue_free()[/code].
+ When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free].
</description>
</method>
<method name="add_control_to_dock">
@@ -53,9 +53,9 @@
<argument index="1" name="control" type="Control">
</argument>
<description>
- Adds the control to a specific dock slot (see [code]DOCK_*[/code] enum for options).
+ Adds the control to a specific dock slot (see [enum DockSlot] for options).
If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
- When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [code]queue_free()[/code].
+ When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free].
</description>
</method>
<method name="add_custom_type">
@@ -167,7 +167,7 @@
<return type="void">
</return>
<description>
- Called by Godot when the user disables the [EditorPlugin] in the Plugin tab of the project settings window
+ Called by the engine when the user disables the [EditorPlugin] in the Plugin tab of the project settings window.
</description>
</method>
<method name="edit" qualifiers="virtual">
@@ -183,7 +183,7 @@
<return type="void">
</return>
<description>
- Called by Godot when the user enables the [EditorPlugin] in the Plugin tab of the project settings window
+ Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window.
</description>
</method>
<method name="forward_canvas_draw_over_viewport" qualifiers="virtual">
@@ -208,26 +208,21 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes.
-
- E.g.
+ Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
[codeblock]
# Prevents the InputEvent to reach other Editor classes
func forward_canvas_gui_input(event):
- var forward = true
- return forward
+ var forward = true
+ return forward
[/codeblock]
-
- Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes.
-
- E.g.
+ Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. Example:
[codeblock]
# Consumes InputEventMouseMotion and forwards other InputEvent types
- func forawrd_canvas_gui_input(event):
- var forward = false
- if event is InputEventMouseMotion:
- forward = true
- return forward
+ func forward_canvas_gui_input(event):
+ var forward = false
+ if event is InputEventMouseMotion:
+ forward = true
+ return forward
[/codeblock]
</description>
</method>
@@ -239,26 +234,21 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes.
-
- E.g.
+ Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
[codeblock]
# Prevents the InputEvent to reach other Editor classes
func forward_spatial_gui_input(camera, event):
- var forward = true
- return forward
+ var forward = true
+ return forward
[/codeblock]
-
- Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes.
-
- E.g.
+ Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. Example:
[codeblock]
# Consumes InputEventMouseMotion and forwards other InputEvent types
- func forawrd_spatial_gui_input(camera, event):
- var forward = false
- if event is InputEventMouseMotion:
- forward = true
- return forward
+ func forward_spatial_gui_input(camera, event):
+ var forward = false
+ if event is InputEventMouseMotion:
+ forward = true
+ return forward
[/codeblock]
</description>
</method>
@@ -381,7 +371,7 @@
<argument index="0" name="control" type="Control">
</argument>
<description>
- Removes the control from the bottom panel. You have to manually [code]queue_free()[/code] the control.
+ Removes the control from the bottom panel. You have to manually [method Node.queue_free] the control.
</description>
</method>
<method name="remove_control_from_container">
@@ -392,7 +382,7 @@
<argument index="1" name="control" type="Control">
</argument>
<description>
- Removes the control from the specified container. You have to manually [code]queue_free()[/code] the control.
+ Removes the control from the specified container. You have to manually [method Node.queue_free] the control.
</description>
</method>
<method name="remove_control_from_docks">
@@ -401,7 +391,7 @@
<argument index="0" name="control" type="Control">
</argument>
<description>
- Removes the control from the dock. You have to manually [code]queue_free()[/code] the control.
+ Removes the control from the dock. You have to manually [method Node.queue_free] the control.
</description>
</method>
<method name="remove_custom_type">