diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 22 | ||||
-rw-r--r-- | doc/classes/Color.xml | 16 | ||||
-rw-r--r-- | doc/classes/NavigationServer3D.xml | 9 | ||||
-rw-r--r-- | doc/classes/String.xml | 13 | ||||
-rw-r--r-- | doc/classes/StringName.xml | 14 |
5 files changed, 37 insertions, 37 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index a8860721d6..d5280cb548 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -803,7 +803,8 @@ Returns the result of [param base] raised to the power of [param exp]. In GDScript, this is the equivalent of the [code]**[/code] operator. [codeblock] - pow(2, 5) # Returns 32 + pow(2, 5) # Returns 32.0 + pow(4, 1.5) # Returns 8.0 [/codeblock] </description> </method> @@ -1287,14 +1288,14 @@ Converts a formatted [param string] that was returned by [method var_to_str] to the original [Variant]. [codeblocks] [gdscript] - var a = '{ "a": 1, "b": 2 }' # a is a String - var b = str_to_var(a) # b is a Dictionary - print(b["a"]) # Prints 1 + var data = '{ "a": 1, "b": 2 }' # data is a String + var dict = str_to_var(data) # dict is a Dictionary + print(dict["a"]) # Prints 1 [/gdscript] [csharp] - string a = "{ \"a\": 1, \"b\": 2 }"; // a is a string - var b = GD.StrToVar(a).AsGodotDictionary(); // b is a Dictionary - GD.Print(b["a"]); // Prints 1 + string data = "{ \"a\": 1, \"b\": 2 }"; // data is a string + var dict = GD.StrToVar(data).AsGodotDictionary(); // dict is a Dictionary + GD.Print(dict["a"]); // Prints 1 [/csharp] [/codeblocks] </description> @@ -2272,7 +2273,7 @@ Command (on macOS) or Meta/Windows key mask. </constant> <constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask" is_bitfield="true"> - Ctrl key mask. + Control key mask. </constant> <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask" is_bitfield="true"> Keypad key mask. @@ -2293,10 +2294,10 @@ Middle mouse button. </constant> <constant name="MOUSE_BUTTON_WHEEL_UP" value="4" enum="MouseButton"> - Mouse wheel up. + Mouse wheel scrolling up. </constant> <constant name="MOUSE_BUTTON_WHEEL_DOWN" value="5" enum="MouseButton"> - Mouse wheel down. + Mouse wheel scrolling down. </constant> <constant name="MOUSE_BUTTON_WHEEL_LEFT" value="6" enum="MouseButton"> Mouse wheel left button (only present on some mice). @@ -2760,6 +2761,7 @@ Hints that a string property is a password, and every character is replaced with the secret character. </constant> <constant name="PROPERTY_HINT_MAX" value="37" enum="PropertyHint"> + Represents the size of the [enum PropertyHint] enum. </constant> <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags" is_bitfield="true"> The property is not stored, and does not display in the editor. This is the default for non-exported properties. diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index cee0e3ef7d..faa658971d 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -203,18 +203,18 @@ <return type="Color" /> <param index="0" name="hex" type="int" /> <description> - Returns the [Color] associated with the provided [param hex] integer in 32-bit ARGB format (8 bits per channel, alpha channel first). + Returns the [Color] associated with the provided [param hex] integer in 32-bit RGBA format (8 bits per channel, alpha channel first). In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix). [codeblocks] [gdscript] - var red = Color.hex(0xffff0000) - var dark_cyan = Color.hex(0xff008b8b) - var my_color = Color.hex(0xa4bbefd2) + var red = Color.hex(0xff0000ff) + var dark_cyan = Color.hex(0x008b8bff) + var my_color = Color.hex(0xbbefd2a4) [/gdscript] [csharp] - var red = new Color(0xffff0000); - var dark_cyan = new Color(0xff008b8b); - var my_color = new Color(0xa4bbefd2); + var red = new Color(0xff0000ff); + var dark_cyan = new Color(0x008b8bff); + var my_color = new Color(0xbbefd2a4); [/csharp] [/codeblocks] </description> @@ -223,7 +223,7 @@ <return type="Color" /> <param index="0" name="hex" type="int" /> <description> - Returns the [Color] associated with the provided [param hex] integer in 64-bit ARGB format (16 bits per channel, alpha channel first). + Returns the [Color] associated with the provided [param hex] integer in 64-bit RGBA format (16 bits per channel, alpha channel first). In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix). </description> </method> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index 16b850866a..1feb363999 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -422,15 +422,6 @@ Sets the map up direction. </description> </method> - <method name="process"> - <return type="void" /> - <param index="0" name="delta_time" type="float" /> - <description> - Process the collision avoidance agents. - The result of this process is needed by the physics server, so this must be called in the main thread. - [b]Note:[/b] This function is not thread safe. - </description> - </method> <method name="query_path" qualifiers="const"> <return type="void" /> <param index="0" name="parameters" type="NavigationPathQueryParameters3D" /> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 792cd38741..8535dacda7 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -193,8 +193,8 @@ GD.Print("Team".Find("I")); // Prints -1 GD.Print("Potato".Find("t")); // Prints 2 - GD.print("Potato".Find("t", 3)); // Prints 4 - GD.print("Potato".Find("t", 5)); // Prints -1 + GD.Print("Potato".Find("t", 3)); // Prints 4 + GD.Print("Potato".Find("t", 5)); // Prints -1 [/csharp] [/codeblocks] [b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the [code]in[/code] operator. @@ -230,6 +230,7 @@ print("User {id} is {name}.".format([["id", 42], ["name", "Godot"]])) [/codeblock] See also the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format string[/url] tutorial. + [b]Note:[/b] In C#, it's recommended to [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]interpolate strings with "$"[/url], instead. </description> </method> <method name="get_base_dir" qualifiers="const"> @@ -480,7 +481,7 @@ var fruits = new string[] {"Apple", "Orange", "Pear", "Kiwi"}; // In C#, this method is static. - GD.Print(string.Join(", ", fruits); // Prints "Apple, Orange, Pear, Kiwi" + GD.Print(string.Join(", ", fruits)); // Prints "Apple, Orange, Pear, Kiwi" GD.Print(string.Join("---", fruits)); // Prints "Apple---Orange---Pear---Kiwi" [/csharp] [/codeblocks] @@ -1047,8 +1048,7 @@ <return type="String" /> <param index="0" name="right" type="Variant" /> <description> - Formats the [String], replacing the placeholders with one or more parameters. - To pass multiple parameters, [param right] needs to be an [Array]. + Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array]. [codeblock] print("I caught %d fishes!" % 2) # Prints "I caught 2 fishes!" @@ -1057,8 +1057,8 @@ var speed = 40.3485 print(my_message % [location, speed]) # Prints "Travelling to Deep Valley, at 40.35 km/h." [/codeblock] - In C#, there is no direct equivalent to this operator. Use the [method format] method, instead. For more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial. + [b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with "$"[/url]. </description> </operator> <operator name="operator +"> @@ -1072,6 +1072,7 @@ <return type="String" /> <param index="0" name="right" type="StringName" /> <description> + Appends [param right] at the end of this [String], returning a [String]. This is also known as a string concatenation. </description> </operator> <operator name="operator <"> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index c103fb2287..96b958a5b9 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -5,7 +5,7 @@ </brief_description> <description> [StringName]s are immutable strings designed for general-purpose representation of unique names (also called "string interning"). [StringName] ensures that only one instance of a given name exists (so two [StringName]s with the same value are the same object). Comparing them is much faster than with regular [String]s, because only the pointers are compared, not the whole strings. - You will usually just pass a [String] to methods expecting a [StringName] and it will be automatically converted, but you may occasionally want to construct a [StringName] ahead of time with [StringName] or, in GDScript, the literal syntax [code]&"example"[/code]. + You will usually just pass a [String] to methods expecting a [StringName] and it will be automatically converted, but you may occasionally want to construct a [StringName] ahead of time with the [StringName] constructor or, in GDScript, the literal syntax [code]&"example"[/code]. See also [NodePath], which is a similar concept specifically designed to store pre-parsed node paths. Some string methods have corresponding variations. Variations suffixed with [code]n[/code] ([method countn], [method findn], [method replacen], etc.) are [b]case-insensitive[/b] (they make no distinction between uppercase and lowercase letters). Method variations prefixed with [code]r[/code] ([method rfind], [method rsplit], etc.) are reversed, and start from the end of the string, instead of the beginning. [b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName("")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code]. @@ -176,8 +176,8 @@ GD.Print("Team".Find("I")); // Prints -1 GD.Print("Potato".Find("t")); // Prints 2 - GD.print("Potato".Find("t", 3)); // Prints 4 - GD.print("Potato".Find("t", 5)); // Prints -1 + GD.Print("Potato".Find("t", 3)); // Prints 4 + GD.Print("Potato".Find("t", 5)); // Prints -1 [/csharp] [/codeblocks] [b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the [code]in[/code] operator. @@ -213,6 +213,7 @@ print("User {id} is {name}.".format([["id", 42], ["name", "Godot"]])) [/codeblock] See also the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format string[/url] tutorial. + [b]Note:[/b] In C#, it's recommended to [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]interpolate strings with "$"[/url], instead. </description> </method> <method name="get_base_dir" qualifiers="const"> @@ -455,7 +456,7 @@ var fruits = new string[] {"Apple", "Orange", "Pear", "Kiwi"}; // In C#, this method is static. - GD.Print(string.Join(", ", fruits); // Prints "Apple, Orange, Pear, Kiwi" + GD.Print(string.Join(", ", fruits)); // Prints "Apple, Orange, Pear, Kiwi" GD.Print(string.Join("---", fruits)); // Prints "Apple---Orange---Pear---Kiwi" [/csharp] [/codeblocks] @@ -954,18 +955,23 @@ <return type="String" /> <param index="0" name="right" type="Variant" /> <description> + Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array]. + For more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial. + [b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with "$"[/url]. </description> </operator> <operator name="operator +"> <return type="String" /> <param index="0" name="right" type="String" /> <description> + Appends [param right] at the end of this [StringName], returning a [String]. This is also known as a string concatenation. </description> </operator> <operator name="operator +"> <return type="String" /> <param index="0" name="right" type="StringName" /> <description> + Appends [param right] at the end of this [StringName], returning a [String]. This is also known as a string concatenation. </description> </operator> <operator name="operator <"> |