From 5b20b49bf721185f05d2881dc04884eb7ffc2b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 22 Jul 2019 12:37:33 +0200 Subject: doc: Formatting fixes in EditorPlugin docs --- doc/classes/EditorPlugin.xml | 66 +++++++++++++++++++------------------------- 1 file 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 @@ - 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]. @@ -40,9 +40,9 @@ - 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]. @@ -53,9 +53,9 @@ - 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]. @@ -167,7 +167,7 @@ - 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. @@ -183,7 +183,7 @@ - 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. @@ -208,26 +208,21 @@ - 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] @@ -239,26 +234,21 @@ - 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] @@ -381,7 +371,7 @@ - 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. @@ -392,7 +382,7 @@ - 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. @@ -401,7 +391,7 @@ - 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. -- cgit v1.2.3