From 10ca7b1d8d149ee852df8d5b4d27ca5fa48feea0 Mon Sep 17 00:00:00 2001 From: Andrey Solomatin <14937307+comminux@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:36:54 +0300 Subject: [PATCH] Made edits to match GDScript code order Updated gdscript_documentation_comments.rst --- .../gdscript_documentation_comments.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tutorials/scripting/gdscript/gdscript_documentation_comments.rst b/tutorials/scripting/gdscript/gdscript_documentation_comments.rst index 4ba08054b..83957a93c 100644 --- a/tutorials/scripting/gdscript/gdscript_documentation_comments.rst +++ b/tutorials/scripting/gdscript/gdscript_documentation_comments.rst @@ -73,13 +73,13 @@ Documenting script members Members that are applicable for documentation: -- Inner class -- Constant -- Function - Signal -- Variable - Enum - Enum value +- Constant +- Variable +- Function +- Inner class Documentation of a script member must immediately precede the member or its annotations if it has any. The description can have more than one line but every line must start with @@ -106,6 +106,8 @@ For example:: Alternatively, you can use inline documentation comments:: + signal my_signal ## My signal. + enum MyEnum { ## My enum. VALUE_A = 0, ## Value A. VALUE_B = 1, ## Value B. @@ -115,11 +117,11 @@ Alternatively, you can use inline documentation comments:: var my_var ## My variable. - signal my_signal ## My signal. func my_func(): ## My func. pass + class MyClass: ## My class. pass @@ -142,9 +144,6 @@ Complete script example ## @tutorial(Tutorial 2): https://example.com/tutorial_2 ## @experimental - ## The description of a constant. - const GRAVITY = 9.8 - ## The description of a signal. signal my_signal @@ -160,6 +159,9 @@ Complete script example RIGHT = 3, } + ## The description of a constant. + const GRAVITY = 9.8 + ## The description of the variable v1. var v1