diff options
author | Michael Alexsander <michaelalexsander@protonmail.com> | 2020-01-23 14:41:49 -0300 |
---|---|---|
committer | Michael Alexsander <michaelalexsander@protonmail.com> | 2020-01-23 14:41:49 -0300 |
commit | c4745c96d78aa6d1dcce642bb0b49d72be5f4e72 (patch) | |
tree | c446dfe2547292843533c57a42daa19f34b8e5ff /doc/classes | |
parent | 1c0995d4509acd0a750f32517b14c01842220cca (diff) |
Remove unnecessary extra spaces before comments in code examples.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Array.xml | 10 | ||||
-rw-r--r-- | doc/classes/Color.xml | 10 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 2 | ||||
-rw-r--r-- | doc/classes/LineEdit.xml | 6 | ||||
-rw-r--r-- | doc/classes/Object.xml | 4 | ||||
-rw-r--r-- | doc/classes/TextEdit.xml | 2 | ||||
-rw-r--r-- | doc/classes/int.xml | 14 |
7 files changed, 24 insertions, 24 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index c192cee1fe..60c744f398 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -8,11 +8,11 @@ [b]Example:[/b] [codeblock] var array = ["One", 2, 3, "Four"] - print(array[0]) # One - print(array[2]) # 3 - print(array[-1]) # Four + print(array[0]) # One. + print(array[2]) # 3. + print(array[-1]) # Four. array[2] = "Three" - print(array[-2]) # Three + print(array[-2]) # Three. [/codeblock] Arrays are always passed by reference. </description> @@ -342,7 +342,7 @@ var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] my_items.sort_custom(MyCustomSorter, "sort_ascending") - print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]] + print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]]. [/codeblock] </description> </method> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 1d4225542a..8820cb5c27 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -18,11 +18,11 @@ <description> Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. See also [method @GDScript.ColorN]. [codeblock] - # Each of the following creates the same color RGBA(178, 217, 10, 255) - var c1 = Color("#ffb2d90a") # ARGB format with "#" - var c2 = Color("ffb2d90a") # ARGB format - var c3 = Color("#b2d90a") # RGB format with "#" - var c4 = Color("b2d90a") # RGB format + # Each of the following creates the same color RGBA(178, 217, 10, 255). + var c1 = Color("#ffb2d90a") # ARGB format with "#". + var c2 = Color("ffb2d90a") # ARGB format. + var c3 = Color("#b2d90a") # RGB format with "#". + var c4 = Color("b2d90a") # RGB format. [/codeblock] </description> </method> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index facf2d1025..29547a67f4 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -32,7 +32,7 @@ To add a key to an existing dictionary, access it like an existing key and assign to it: [codeblock] var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} - var points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. + var points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. [/codeblock] Finally, dictionaries can contain different types of keys and values in the same dictionary: [codeblock] diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 8463db9cd5..324f6db9b8 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -78,9 +78,9 @@ Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end. [codeblock] text = "Welcome" - select() # Will select "Welcome" - select(4) # Will select "ome" - select(2, 5) # Will select "lco" + select() # Will select "Welcome". + select(4) # Will select "ome". + select(2, 5) # Will select "lco". [/codeblock] </description> </method> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index d063bd81e7..1cf6dfb83f 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -12,8 +12,8 @@ Property membership can be tested directly in GDScript using [code]in[/code]: [codeblock] var n = Node2D.new() - print("position" in n) # Prints "True". - print("other_property" in n) # Prints "False". + print("position" in n) # Prints "True". + print("other_property" in n) # Prints "False". [/codeblock] Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification]. </description> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 3deed63ae7..6724c3bceb 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -315,7 +315,7 @@ [codeblock] var result = search(key, flags, line, column) if result.size() > 0: - # result found + # Result found. var res_line = result[TextEdit.SEARCH_RESULT_LINE] var res_column = result[TextEdit.SEARCH_RESULT_COLUMN] [/codeblock] diff --git a/doc/classes/int.xml b/doc/classes/int.xml index dad0f0d8c0..39017f7119 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -8,16 +8,16 @@ It can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. [int] is a [Variant] type, and will thus be used when assigning an integer value to a [Variant]. It can also be enforced with the [code]: int[/code] type hint. [codeblock] - var my_variant = 0 # int, value 0 - my_variant += 4.2 # float, value 4.2 - var my_int: int = 1 # int, value 1 - my_int = 4.2 # int, value 4, the right value is implicitly cast to int - my_int = int("6.7") # int, value 6, the String is explicitly cast with [method int] + var my_variant = 0 # int, value 0. + my_variant += 4.2 # float, value 4.2. + var my_int: int = 1 # int, value 1. + my_int = 4.2 # int, value 4, the right value is implicitly cast to int. + my_int = int("6.7") # int, value 6, the String is explicitly cast with int. var max_int = 9223372036854775807 - print(max_int) # 9223372036854775807, OK + print(max_int) # 9223372036854775807, OK. max_int += 1 - print(max_int) # -9223372036854775808, we overflowed and wrapped around + print(max_int) # -9223372036854775808, we overflowed and wrapped around. [/codeblock] </description> <tutorials> |