diff options
Diffstat (limited to 'doc/classes')
37 files changed, 104 insertions, 112 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 339bbb71dd..63f5947280 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -667,12 +667,9 @@ <return type="float" /> <param index="0" name="lin" type="float" /> <description> - Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). - [b]Example:[/b] + Converts from linear energy to decibels (audio). Since volume is not normally linear, this can be used to implement volume sliders that behave as expected. + [b]Example:[/b] Change the Master bus's volume through a [Slider] node, which ranges from [code]0.0[/code] to [code]1.0[/code]: [codeblock] - # "Slider" refers to a node that inherits Range such as HSlider or VSlider. - # Its range must be configured to go from 0 to 1. - # Change the bus name if you'd like to change the volume of a specific bus only. AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value)) [/codeblock] </description> @@ -2603,8 +2600,7 @@ </constant> <constant name="OK" value="0" enum="Error"> Methods that return [enum Error] return [constant OK] when no error occurred. - Since [constant OK] has value 0, and all other error constants are positive integers, it can also be used in boolean checks. - [b]Example:[/b] + Since [constant OK] has value [code]0[/code], and all other error constants are positive integers, it can also be used in boolean checks. [codeblock] var error = method_that_returns_error() if error != OK: @@ -2867,7 +2863,7 @@ hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}"; [/csharp] [/codeblocks] - Examples: + [b]Examples:[/b] [codeblocks] [gdscript] hint_string = "%d:" % [TYPE_INT] # Array of integers. diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 2ea6aa15bd..cfb7d00861 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -169,7 +169,7 @@ astar.ConnectPoints(2, 3, false); astar.ConnectPoints(4, 3, false); astar.ConnectPoints(1, 4, false); - int[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] + long[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] [/csharp] [/codeblocks] If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. @@ -209,7 +209,7 @@ astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true); - int[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] + long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] [/csharp] [/codeblocks] </description> diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml index 281f4edcc1..4448698c32 100644 --- a/doc/classes/AStar3D.xml +++ b/doc/classes/AStar3D.xml @@ -197,7 +197,7 @@ astar.ConnectPoints(2, 3, false); astar.ConnectPoints(4, 3, false); astar.ConnectPoints(1, 4, false); - int[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] + long[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] [/csharp] [/codeblocks] If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. @@ -236,7 +236,7 @@ astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true); - int[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] + long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] [/csharp] [/codeblocks] </description> diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index 012ae4fe29..88e543591a 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -54,12 +54,10 @@ <param index="0" name="frame" type="int" /> <param index="1" name="progress" type="float" /> <description> - The setter of [member frame] resets the [member frame_progress] to [code]0.0[/code] implicitly, but this method avoids that. - This is useful when you want to carry over the current [member frame_progress] to another [member frame]. - [b]Example:[/b] + Sets [member frame] the [member frame_progress] to the given values. Unlike setting [member frame], this method does not reset the [member frame_progress] to [code]0.0[/code] implicitly. + [b]Example:[/b] Change the animation while keeping the same [member frame] and [member frame_progress]. [codeblocks] [gdscript] - # Change the animation with keeping the frame index and progress. var current_frame = animated_sprite.get_frame() var current_progress = animated_sprite.get_frame_progress() animated_sprite.play("walk_another_skin") diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 5f0a6c3e8d..a466fc32ac 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -53,12 +53,10 @@ <param index="0" name="frame" type="int" /> <param index="1" name="progress" type="float" /> <description> - The setter of [member frame] resets the [member frame_progress] to [code]0.0[/code] implicitly, but this method avoids that. - This is useful when you want to carry over the current [member frame_progress] to another [member frame]. - [b]Example:[/b] + Sets [member frame] the [member frame_progress] to the given values. Unlike setting [member frame], this method does not reset the [member frame_progress] to [code]0.0[/code] implicitly. + [b]Example:[/b] Change the animation while keeping the same [member frame] and [member frame_progress]. [codeblocks] [gdscript] - # Change the animation with keeping the frame index and progress. var current_frame = animated_sprite.get_frame() var current_progress = animated_sprite.get_frame_progress() animated_sprite.play("walk_another_skin") diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 86311542ad..e80b1f00b0 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -5,7 +5,6 @@ </brief_description> <description> Contains multiple [AnimationRootNode]s representing animation states, connected in a graph. State transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically. - [b]Example:[/b] [codeblocks] [gdscript] var state_machine = $AnimationTree.get("parameters/playback") diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 943e6ed7d9..891dfa9f75 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -5,7 +5,6 @@ </brief_description> <description> Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code]. - [b]Example:[/b] [codeblocks] [gdscript] var state_machine = $AnimationTree.get("parameters/playback") diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index bd0e05f8e0..f4dcc9bf68 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -4,8 +4,7 @@ A built-in data structure that holds a sequence of elements. </brief_description> <description> - An array data structure that can contain a sequence of elements of any [Variant] type. Elements are accessed by a numerical index starting at 0. Negative indices are used to count from the back (-1 is the last element, -2 is the second to last, etc.). - [b]Example:[/b] + An array data structure that can contain a sequence of elements of any [Variant] type. Elements are accessed by a numerical index starting at [code]0[/code]. Negative indices are used to count from the back ([code]-1[/code] is the last element, [code]-2[/code] is the second to last, etc.). [codeblocks] [gdscript] var array = ["First", 2, 3, "Last"] @@ -243,7 +242,7 @@ var numbers = [1, 2, 3] var extra = [4, 5, 6] numbers.append_array(extra) - print(nums) # Prints [1, 2, 3, 4, 5, 6] + print(numbers) # Prints [1, 2, 3, 4, 5, 6] [/codeblock] </description> </method> @@ -728,7 +727,7 @@ print(my_items) # Prints [["Rice", 4], ["Tomato", 5], ["Apple", 9]] # Sort descending, using a lambda function. - my_items.sort_custom(func(a, b): return a[0] > b[0]) + my_items.sort_custom(func(a, b): return a[1] > b[1]) print(my_items) # Prints [["Apple", 9], ["Tomato", 5], ["Rice", 4]] [/codeblock] It may also be necessary to use this method to sort strings by natural order, with [method String.naturalnocasecmp_to], as in the following example: diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 05174abb07..0c8f3c66f5 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -5,7 +5,6 @@ </brief_description> <description> [Callable] is a built-in [Variant] type that represents a function. It can either be a method within an [Object] instance, or a custom callable used for different purposes (see [method is_custom]). Like all [Variant] types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. - [b]Example:[/b] [codeblocks] [gdscript] func print_args(arg1, arg2, arg3 = ""): @@ -203,7 +202,8 @@ <method name="is_null" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if this [Callable] has no target to call the method on. + Returns [code]true[/code] if this [Callable] has no target to call the method on. Equivalent to [code]callable == Callable()[/code]. + [b]Note:[/b] This is [i]not[/i] the same as [code]not is_valid()[/code] and using [code]not is_null()[/code] will [i]not[/i] guarantee that this callable can be called. Use [method is_valid] instead. </description> </method> <method name="is_standard" qualifiers="const"> diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml index e6a37a20e1..afb9e70601 100644 --- a/doc/classes/CallbackTweener.xml +++ b/doc/classes/CallbackTweener.xml @@ -16,10 +16,10 @@ <param index="0" name="delay" type="float" /> <description> Makes the callback call delayed by given time in seconds. - [b]Example:[/b] + [b]Example:[/b] Call [method Node.queue_free] after 2 seconds. [codeblock] var tween = get_tree().create_tween() - tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds + tween.tween_callback(queue_free).set_delay(2) [/codeblock] </description> </method> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index 66b67d1a59..99d0c9be84 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -16,6 +16,14 @@ Returns [code]true[/code] if objects can be instantiated from the specified [param class], otherwise returns [code]false[/code]. </description> </method> + <method name="class_call_static_method" qualifiers="vararg"> + <return type="Variant" /> + <param index="0" name="class" type="StringName" /> + <param index="1" name="method" type="StringName" /> + <description> + Calls a static method on a class. + </description> + </method> <method name="class_exists" qualifiers="const"> <return type="bool" /> <param index="0" name="class" type="StringName" /> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 7187617c4c..178be439c3 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -301,7 +301,7 @@ <param index="1" name="valid_types" type="StringName[]" default="[]" /> <description> Pops up an editor dialog for selecting a [Node] from the edited scene. The [param callback] must take a single argument of type [NodePath]. It is called on the selected [NodePath] or the empty path [code]^""[/code] if the dialog is canceled. If [param valid_types] is provided, the dialog will only show Nodes that match one of the listed Node types. - [b]Example:[/b] + [b]Example:[/b] Display the node selection dialog as soon as this node is added to the tree for the first time: [codeblock] func _ready(): if Engine.is_editor_hint(): @@ -322,7 +322,6 @@ <param index="2" name="type_filter" type="PackedInt32Array" default="PackedInt32Array()" /> <description> Pops up an editor dialog for selecting properties from [param object]. The [param callback] must take a single argument of type [NodePath]. It is called on the selected property path (see [method NodePath.get_as_property_path]) or the empty path [code]^""[/code] if the dialog is canceled. If [param type_filter] is provided, the dialog will only show properties that match one of the listed [enum Variant.Type] values. - [b]Example:[/b] [codeblock] func _ready(): if Engine.is_editor_hint(): diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 9c1a6f6af6..ed3233b1ae 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -104,7 +104,6 @@ <param index="1" name="event" type="InputEvent" /> <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. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options. - [b]Example:[/b] [codeblocks] [gdscript] # Prevents the InputEvent from reaching other Editor classes. @@ -119,8 +118,7 @@ } [/csharp] [/codeblocks] - Must [code]return EditorPlugin.AFTER_GUI_INPUT_PASS[/code] in order to forward the [InputEvent] to other Editor classes. - [b]Example:[/b] + This method must return [constant AFTER_GUI_INPUT_PASS] in order to forward the [InputEvent] to other Editor classes. [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. @@ -188,8 +186,7 @@ <return type="bool" /> <param index="0" name="event" type="InputEvent" /> <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 [param event], otherwise forwards [param event] to other Editor classes. - [b]Example:[/b] + Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 2D viewport. If this method returns [code]true[/code], [param event] is intercepted by this [EditorPlugin], otherwise [param event] is forwarded to other Editor classes. [codeblocks] [gdscript] # Prevents the InputEvent from reaching other Editor classes. @@ -204,8 +201,7 @@ } [/csharp] [/codeblocks] - Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. - [b]Example:[/b] + This method must return [code]false[/code] in order to forward the [InputEvent] to other Editor classes. [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 320b119b6a..4bb7149f2f 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -38,7 +38,6 @@ - [code]name[/code]: [String] (the name of the property) - [code]type[/code]: [int] (see [enum Variant.Type]) - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String] - [b]Example:[/b] [codeblocks] [gdscript] var settings = EditorInterface.get_editor_settings() @@ -701,6 +700,9 @@ <member name="interface/editor/project_manager_screen" type="int" setter="" getter=""> The preferred monitor to display the project manager. </member> + <member name="interface/editor/remember_window_size_and_position" type="bool" setter="" getter=""> + If [code]true[/code], the editor window will remember its size, position, and which screen it was displayed on across restarts. + </member> <member name="interface/editor/save_each_scene_on_quit" type="bool" setter="" getter=""> If [code]false[/code], the editor will save all scenes when confirming the [b]Save[/b] action when quitting the editor or quitting to the project list. If [code]true[/code], the editor will ask to save each scene individually. </member> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index b6007a3b6b..864c29a2b5 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -59,8 +59,7 @@ <method name="get_response_headers_as_dictionary"> <return type="Dictionary" /> <description> - Returns all response headers as a Dictionary of structure [code]{ "key": "value1; value2" }[/code] where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. - [b]Example:[/b] + Returns all response headers as a [Dictionary]. Each entry is composed by the header name, and a [String] containing the values separated by [code]"; "[/code]. The casing is kept the same as the headers were received. [codeblock] { "content-length": 12, diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index e254fd56e9..0fd84fb452 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -541,7 +541,6 @@ <param index="2" name="color" type="Color" /> <description> Sets the [Color] of the pixel at [code](x, y)[/code] to [param color]. - [b]Example:[/b] [codeblocks] [gdscript] var img_width = 10 @@ -567,7 +566,6 @@ <param index="1" name="color" type="Color" /> <description> Sets the [Color] of the pixel at [param point] to [param color]. - [b]Example:[/b] [codeblocks] [gdscript] var img_width = 10 diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 5fdcc0b26b..6fe5b7a802 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -287,7 +287,6 @@ <param index="0" name="event" type="InputEvent" /> <description> Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls. - [b]Example:[/b] [codeblocks] [gdscript] var cancel_event = InputEventAction.new() diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 98a0221fe8..bcfe5b70fd 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -6,6 +6,7 @@ <description> Stores information about a mouse or a pen motion. This includes relative position, absolute position, and velocity. See [method Node._input]. [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set [member Input.use_accumulated_input] to [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly. + [b]Note:[/b] This event may be emitted even when the mouse hasn't moved, either by the operating system or by Godot itself. If you really need to know if the mouse has moved (e.g. to suppress displaying a tooltip), you should check that [code]relative.is_zero_approx()[/code] is [code]false[/code]. </description> <tutorials> <link title="Using InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link> @@ -22,12 +23,13 @@ </member> <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2(0, 0)"> The mouse position relative to the previous position (position at the last frame). - [b]Note:[/b] Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of [code]Vector2(0, 0)[/code] when the user stops moving the mouse. + [b]Note:[/b] Since [InputEventMouseMotion] may only be emitted when the mouse moves, it is not possible to reliably detect when the mouse has stopped moving by checking this property. A separate, short timer may be necessary. [b]Note:[/b] [member relative] is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means mouse sensitivity will appear different depending on resolution when using [member relative] in a script that handles mouse aiming with the [constant Input.MOUSE_MODE_CAPTURED] mouse mode. To avoid this, use [member screen_relative] instead. </member> <member name="screen_relative" type="Vector2" setter="set_screen_relative" getter="get_screen_relative" default="Vector2(0, 0)"> The unscaled mouse position relative to the previous position in the coordinate system of the screen (position at the last frame). - [b]Note:[/b] Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of [code]Vector2(0, 0)[/code] when the user stops moving the mouse. This coordinate is [i]not[/i] scaled according to the content scale factor or calls to [method InputEvent.xformed_by]. This should be preferred over [member relative] for mouse aiming when using the [constant Input.MOUSE_MODE_CAPTURED] mouse mode, regardless of the project's stretch mode. + [b]Note:[/b] Since [InputEventMouseMotion] may only be emitted when the mouse moves, it is not possible to reliably detect when the mouse has stopped moving by checking this property. A separate, short timer may be necessary. + [b]Note:[/b] This coordinate is [i]not[/i] scaled according to the content scale factor or calls to [method InputEvent.xformed_by]. This should be preferred over [member relative] for mouse aiming when using the [constant Input.MOUSE_MODE_CAPTURED] mouse mode, regardless of the project's stretch mode. </member> <member name="screen_velocity" type="Vector2" setter="set_screen_velocity" getter="get_screen_velocity" default="Vector2(0, 0)"> The unscaled mouse velocity in pixels per second in screen coordinates. This velocity is [i]not[/i] scaled according to the content scale factor or calls to [method InputEvent.xformed_by]. This should be preferred over [member velocity] for mouse aiming when using the [constant Input.MOUSE_MODE_CAPTURED] mouse mode, regardless of the project's stretch mode. diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index d97a68cf2e..8a19aa39bf 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -6,8 +6,7 @@ <description> The [JSON] class enables all data types to be converted to and from a JSON string. This is useful for serializing data, e.g. to save to a file or send over the network. [method stringify] is used to convert any data type into a JSON string. - [method parse] is used to convert any existing JSON data into a [Variant] that can be used within Godot. If successfully parsed, use [member data] to retrieve the [Variant], and use [code]typeof[/code] to check if the Variant's type is what you expect. JSON Objects are converted into a [Dictionary], but JSON data can be used to store [Array]s, numbers, [String]s and even just a boolean. - [b]Example[/b] + [method parse] is used to convert any existing JSON data into a [Variant] that can be used within Godot. If successfully parsed, use [member data] to retrieve the [Variant], and use [method @GlobalScope.typeof] to check if the Variant's type is what you expect. JSON Objects are converted into a [Dictionary], but JSON data can be used to store [Array]s, numbers, [String]s and even just a boolean. [codeblock] var data_to_send = ["a", "b", "c"] var json_string = JSON.stringify(data_to_send) @@ -33,7 +32,7 @@ - Trailing commas in arrays or objects are ignored, instead of causing a parser error. - New line and tab characters are accepted in string literals, and are treated like their corresponding escape sequences [code]\n[/code] and [code]\t[/code]. - Numbers are parsed using [method String.to_float] which is generally more lax than the JSON specification. - - Certain errors, such as invalid Unicode sequences, do not cause a parser error. Instead, the string is cleansed and an error is logged to the console. + - Certain errors, such as invalid Unicode sequences, do not cause a parser error. Instead, the string is cleaned up and an error is logged to the console. </description> <tutorials> </tutorials> diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml index 73a06c4719..914fd997f4 100644 --- a/doc/classes/JavaScriptObject.xml +++ b/doc/classes/JavaScriptObject.xml @@ -5,7 +5,6 @@ </brief_description> <description> JavaScriptObject is used to interact with JavaScript objects retrieved or created via [method JavaScriptBridge.get_interface], [method JavaScriptBridge.create_object], or [method JavaScriptBridge.create_callback]. - [b]Example:[/b] [codeblock] extends Node diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 77fff22157..f938460c2f 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -231,8 +231,8 @@ </member> <member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0"> Maximum number of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit. - When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting. If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter. - [b]Example:[/b] + When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting. + If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter: [codeblocks] [gdscript] text = "Hello world" diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index bcdffcd1ee..b1b3d74711 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -32,7 +32,6 @@ </member> <member name="uri" type="String" setter="set_uri" getter="get_uri" default=""""> The [url=https://en.wikipedia.org/wiki/Uniform_Resource_Identifier]URI[/url] for this [LinkButton]. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via [method OS.shell_open]). HTTP and HTTPS URLs open the default web browser. - [b]Examples:[/b] [codeblocks] [gdscript] uri = "https://godotengine.org" # Opens the URL in the default web browser. diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index 0b9890b2ec..f339a26e93 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -139,8 +139,7 @@ <param index="1" name="vertex" type="int" /> <description> Returns the specified vertex index of the given face. - Vertex argument must be either 0, 1, or 2 because faces contain three vertices. - [b]Example:[/b] + [param vertex] must be either [code]0[/code], [code]1[/code], or [code]2[/code] because faces contain three vertices. [codeblocks] [gdscript] var index = mesh_data_tool.get_face_vertex(0, 1) # Gets the index of the second vertex of the first face. diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index ed420f4587..0cfa3a5d4a 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -136,7 +136,7 @@ } } - private List<int> _numbers = new(); + private Godot.Collections.Array<int> _numbers = new(); public override Godot.Collections.Array<Godot.Collections.Dictionary> _GetPropertyList() { @@ -173,7 +173,7 @@ if (propertyName.StartsWith("number_")) { int index = int.Parse(propertyName.Substring("number_".Length)); - numbers[index] = value.As<int>(); + _numbers[index] = value.As<int>(); return true; } return false; diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 252574c419..bf1632965b 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -23,7 +23,6 @@ - [code]"name"[/code]: [String] (the property's name) - [code]"type"[/code]: [int] (see [enum Variant.Type]) - optionally [code]"hint"[/code]: [int] (see [enum PropertyHint]) and [code]"hint_string"[/code]: [String] - [b]Example:[/b] [codeblocks] [gdscript] ProjectSettings.set("category/property_name", 0) @@ -85,7 +84,6 @@ <param index="1" name="default_value" type="Variant" default="null" /> <description> Returns the value of the setting identified by [param name]. If the setting doesn't exist and [param default_value] is specified, the value of [param default_value] is returned. Otherwise, [code]null[/code] is returned. - [b]Example:[/b] [codeblocks] [gdscript] print(ProjectSettings.get_setting("application/config/name")) @@ -104,8 +102,7 @@ <param index="0" name="name" type="StringName" /> <description> Similar to [method get_setting], but applies feature tag overrides if any exists and is valid. - [b]Example:[/b] - If the following setting override exists "application/config/name.windows", and the following code is executed: + [b]Example:[/b] If the setting override [code]"application/config/name.windows"[/code] exists, and the following code is executed on a [i]Windows[/i] operating system, the overridden setting is printed instead: [codeblocks] [gdscript] print(ProjectSettings.get_setting_with_override("application/config/name")) @@ -114,7 +111,6 @@ GD.Print(ProjectSettings.GetSettingWithOverride("application/config/name")); [/csharp] [/codeblocks] - Then the overridden setting will be returned instead if the project is running on the [i]Windows[/i] operating system. </description> </method> <method name="globalize_path" qualifiers="const"> @@ -224,7 +220,6 @@ <param index="1" name="value" type="Variant" /> <description> Sets the value of a setting. - [b]Example:[/b] [codeblocks] [gdscript] ProjectSettings.set_setting("application/config/name", "Example") @@ -2334,7 +2329,6 @@ If [code]true[/code], the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. See also [member Node.physics_interpolation_mode] and [method Node.reset_physics_interpolation]. [b]Note:[/b] If [code]true[/code], the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0.0[/code]. [b]Note:[/b] This property is only read when the project starts. To toggle physics interpolation at runtime, set [member SceneTree.physics_interpolation] instead. - [b]Note:[/b] This feature is currently only implemented in the 2D renderer. </member> <member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5"> Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be good enough for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. @@ -2526,8 +2520,8 @@ [b]Note:[/b] This setting is implemented only on Linux/X11. </member> <member name="rendering/gl_compatibility/fallback_to_native" type="bool" setter="" getter="" default="true"> - If [code]true[/code], the compatibility renderer will fall back to native OpenGL if ANGLE over Metal is not supported. - [b]Note:[/b] This setting is implemented only on macOS. + If [code]true[/code], the compatibility renderer will fall back to native OpenGL if ANGLE is not supported, or ANGLE dynamic libraries aren't found. + [b]Note:[/b] This setting is implemented on macOS and Windows. </member> <member name="rendering/gl_compatibility/force_angle_on_devices" type="Array" setter="" getter=""> An [Array] of devices which should always use the ANGLE renderer. @@ -2694,6 +2688,8 @@ <member name="rendering/limits/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10"> </member> <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600"> + Maximum time (in seconds) before the [code]TIME[/code] shader built-in variable rolls over. The [code]TIME[/code] variable increments by [code]delta[/code] each frame, and when it exceeds this value, it rolls over to [code]0.0[/code]. Since large floating-point values are less precise than small floating-point values, this should be set as low as possible to maximize the precision of the [code]TIME[/code] built-in variable in shaders. This is especially important on mobile platforms where precision in shaders is significantly reduced. However, if this is set too low, shader animations may appear to restart from the beginning while the project is running. + On desktop platforms, values below [code]4096[/code] are recommended, ideally below [code]2048[/code]. On mobile platforms, values below [code]64[/code] are recommended, ideally below [code]32[/code]. </member> <member name="rendering/mesh_lod/lod_change/threshold_pixels" type="float" setter="" getter="" default="1.0"> The automatic LOD bias to use for meshes rendered within the [ReflectionProbe]. Higher values will use less detailed versions of meshes that have LOD variations generated. If set to [code]0.0[/code], automatic LOD is disabled. Increase [member rendering/mesh_lod/lod_change/threshold_pixels] to improve performance at the cost of geometry detail. diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml index d3875ddfc2..b7aa6947d9 100644 --- a/doc/classes/PropertyTweener.xml +++ b/doc/classes/PropertyTweener.xml @@ -14,10 +14,10 @@ <return type="PropertyTweener" /> <description> When called, the final value will be used as a relative value instead. - [b]Example:[/b] + [b]Example:[/b] Move the node by [code]100[/code] pixels to the right. [codeblock] var tween = get_tree().create_tween() - tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right + tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() [/codeblock] </description> </method> @@ -26,10 +26,10 @@ <param index="0" name="value" type="Variant" /> <description> Sets a custom initial value to the [PropertyTweener]. - [b]Example:[/b] + [b]Example:[/b] Move the node from position [code](100, 100)[/code] to [code](200, 100)[/code]. [codeblock] var tween = get_tree().create_tween() - tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) #this will move the node from position (100, 100) to (200, 100) + tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) [/codeblock] </description> </method> @@ -48,7 +48,6 @@ <param index="0" name="interpolator_method" type="Callable" /> <description> Allows interpolating the value with a custom easing function. The provided [param interpolator_method] will be called with a value ranging from [code]0.0[/code] to [code]1.0[/code] and is expected to return a value within the same range (values outside the range can be used for overshoot). The return value of the method is then used for interpolation between initial and final value. Note that the parameter passed to the method is still subject to the tweener's own easing. - [b]Example:[/b] [codeblock] @export var curve: Curve diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 96c7d0d4d4..ddd52c6835 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -497,7 +497,7 @@ <return type="int" /> <description> Returns how many allocations the GPU has performed for internal driver structures. - This is only used by Vulkan in Debug builds and can return 0 when this information is not tracked or unknown. + This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. </description> </method> <method name="get_device_allocs_by_object_type" qualifiers="const"> @@ -506,7 +506,7 @@ <description> Same as [method get_device_allocation_count] but filtered for a given object type. The type argument must be in range [code][0; get_tracked_object_type_count - 1][/code]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns 0. - This is only used by Vulkan in Debug builds and can return 0 when this information is not tracked or unknown. + This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. </description> </method> <method name="get_device_memory_by_object_type" qualifiers="const"> @@ -515,7 +515,7 @@ <description> Same as [method get_device_total_memory] but filtered for a given object type. The type argument must be in range [code][0; get_tracked_object_type_count - 1][/code]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns 0. - This is only used by Vulkan in Debug builds and can return 0 when this information is not tracked or unknown. + This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. </description> </method> <method name="get_device_name" qualifiers="const"> @@ -534,7 +534,7 @@ <return type="int" /> <description> Returns how much bytes the GPU is using. - This is only used by Vulkan in Debug builds and can return 0 when this information is not tracked or unknown. + This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. </description> </method> <method name="get_device_vendor_name" qualifiers="const"> @@ -547,7 +547,7 @@ <return type="int" /> <description> Returns how many allocations the GPU driver has performed for internal driver structures. - This is only used by Vulkan in Debug builds and can return 0 when this information is not tracked or unknown. + This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. </description> </method> <method name="get_driver_allocs_by_object_type" qualifiers="const"> @@ -556,7 +556,24 @@ <description> Same as [method get_driver_allocation_count] but filtered for a given object type. The type argument must be in range [code][0; get_tracked_object_type_count - 1][/code]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns 0. - This is only used by Vulkan in Debug builds and can return 0 when this information is not tracked or unknown. + This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + </description> + </method> + <method name="get_driver_and_device_memory_report" qualifiers="const"> + <return type="String" /> + <description> + Returns string report in CSV format using the following methods: + - [method get_tracked_object_name] + - [method get_tracked_object_type_count] + - [method get_driver_total_memory] + - [method get_driver_allocation_count] + - [method get_driver_memory_by_object_type] + - [method get_driver_allocs_by_object_type] + - [method get_device_total_memory] + - [method get_device_allocation_count] + - [method get_device_memory_by_object_type] + - [method get_device_allocs_by_object_type] + This is only used by Vulkan in debug builds. Godot must also be started with the [code]--extra-gpu-memory-tracking[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </description> </method> <method name="get_driver_memory_by_object_type" qualifiers="const"> @@ -565,7 +582,7 @@ <description> Same as [method get_driver_total_memory] but filtered for a given object type. The type argument must be in range [code][0; get_tracked_object_type_count - 1][/code]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns 0. - This is only used by Vulkan in Debug builds and can return 0 when this information is not tracked or unknown. + This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. </description> </method> <method name="get_driver_resource"> @@ -581,7 +598,7 @@ <return type="int" /> <description> Returns how much bytes the GPU driver is using for internal driver structures. - This is only used by Vulkan in Debug builds and can return 0 when this information is not tracked or unknown. + This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. </description> </method> <method name="get_frame_delay" qualifiers="const"> @@ -614,14 +631,14 @@ - SWAPCHAIN_KHR - COMMAND_POOL Thus if e.g. [code]get_tracked_object_name(5)[/code] returns "COMMAND_POOL", then [code]get_device_memory_by_object_type(5)[/code] returns the bytes used by the GPU for command pools. - This is only used by Vulkan in Debug builds. + This is only used by Vulkan in debug builds. Godot must also be started with the [code]--extra-gpu-memory-tracking[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </description> </method> <method name="get_tracked_object_type_count" qualifiers="const"> <return type="int" /> <description> Returns how many types of trackable objects are. - This is only used by Vulkan in Debug builds. + This is only used by Vulkan in debug builds. Godot must also be started with the [code]--extra-gpu-memory-tracking[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </description> </method> <method name="index_array_create"> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 74d083594f..fe09472c14 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -14,7 +14,7 @@ <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link> </tutorials> <methods> - <method name="_get_rid" qualifiers="virtual"> + <method name="_get_rid" qualifiers="virtual const"> <return type="RID" /> <description> Override this method to return a custom [RID] when [method get_rid] is called. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 7e0c39ac7c..9a772835a6 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -70,7 +70,7 @@ <param index="0" name="character" type="int" /> <description> Returns the line number of the character position provided. Line and character numbers are both zero-indexed. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_character_paragraph"> @@ -78,28 +78,28 @@ <param index="0" name="character" type="int" /> <description> Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_content_height" qualifiers="const"> <return type="int" /> <description> Returns the height of the content. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_content_width" qualifiers="const"> <return type="int" /> <description> Returns the width of the content. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_line_count" qualifiers="const"> <return type="int" /> <description> Returns the total number of lines in the text. Wrapped text is counted as multiple lines. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_line_offset"> @@ -107,7 +107,7 @@ <param index="0" name="line" type="int" /> <description> Returns the vertical offset of the line found at the provided index. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_menu" qualifiers="const"> @@ -167,7 +167,7 @@ <param index="0" name="paragraph" type="int" /> <description> Returns the vertical offset of the paragraph found at the provided index. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_parsed_text" qualifiers="const"> @@ -211,14 +211,14 @@ <return type="int" /> <description> Returns the number of visible lines. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_visible_paragraph_count" qualifiers="const"> <return type="int" /> <description> Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. - [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="install_effect"> @@ -256,13 +256,19 @@ Invalidates [param paragraph] and all subsequent paragraphs cache. </description> </method> + <method name="is_finished" qualifiers="const"> + <return type="bool" /> + <description> + If [member threaded] is enabled, returns [code]true[/code] if the background thread has finished text processing, otherwise always return [code]true[/code]. + </description> + </method> <method name="is_menu_visible" qualifiers="const"> <return type="bool" /> <description> Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). </description> </method> - <method name="is_ready" qualifiers="const"> + <method name="is_ready" qualifiers="const" deprecated="Use [method is_finished] instead."> <return type="bool" /> <description> If [member threaded] is enabled, returns [code]true[/code] if the background thread has finished text processing, otherwise always return [code]true[/code]. diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 43ee4dda60..50adecccf5 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -40,7 +40,6 @@ <description> Opens help for the given topic. The [param topic] is an encoded string that controls which class, method, constant, signal, annotation, property, or theme item should be focused. The supported [param topic] formats include [code]class_name:class[/code], [code]class_method:class:method[/code], [code]class_constant:class:constant[/code], [code]class_signal:class:signal[/code], [code]class_annotation:class:@annotation[/code], [code]class_property:class:property[/code], and [code]class_theme_item:class:item[/code], where [code]class[/code] is the class name, [code]method[/code] is the method name, [code]constant[/code] is the constant name, [code]signal[/code] is the signal name, [code]annotation[/code] is the annotation name, [code]property[/code] is the property name, and [code]item[/code] is the theme item. - [b]Examples:[/b] [codeblock] # Shows help for the Node class. class_name:Node diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index 07e15d0b23..7d6ff1e9b0 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -119,7 +119,7 @@ <method name="is_null" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the signal's name does not exist in its object, or the object is not valid. + Returns [code]true[/code] if this [Signal] has no object and the signal name is empty. Equivalent to [code]signal == Signal()[/code]. </description> </method> </methods> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 03e247ec8a..2fe2a0eaa1 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -5,7 +5,7 @@ </brief_description> <description> [SpinBox] is a numerical input text field. It allows entering integers and floating-point numbers. - [b]Example:[/b] + [b]Example:[/b] Create a [SpinBox], disable its context menu and set its text alignment to right. [codeblocks] [gdscript] var spin_box = SpinBox.new() @@ -22,7 +22,6 @@ spinBox.AlignHorizontal = LineEdit.HorizontalAlignEnum.Right; [/csharp] [/codeblocks] - The above code will create a [SpinBox], disable context menu on it and set the text alignment to right. See [Range] class for more options over the [SpinBox]. [b]Note:[/b] With the [SpinBox]'s context menu disabled, you can right-click the bottom half of the spinbox to set the value to its minimum, while right-clicking the top half sets the value to its maximum. [b]Note:[/b] [SpinBox] relies on an underlying [LineEdit] node. To theme a [SpinBox]'s background, add theme items for [LineEdit] and customize them. diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index 10ac4b0fcc..d73cb02d94 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -13,8 +13,8 @@ <method name="get_rect" qualifiers="const"> <return type="Rect2" /> <description> - Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. - [b]Example:[/b] + Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. + [b]Example:[/b] Detect if the Sprite2D was clicked: [codeblocks] [gdscript] func _input(event): diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 450e483f69..de3d3e7cb9 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -324,7 +324,6 @@ <description> Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns the original string if [param delimiter] does not occur in the string. Returns an empty string if the [param slice] does not exist. This is faster than [method split], if you only need one substring. - [b]Example:[/b] [codeblock] print("i/am/example/hi".get_slice("/", 2)) # Prints "example" [/codeblock] @@ -527,7 +526,6 @@ <param index="0" name="parts" type="PackedStringArray" /> <description> Returns the concatenation of [param parts]' elements, with each element separated by the string calling this method. This method is the opposite of [method split]. - [b]Example:[/b] [codeblocks] [gdscript] var fruits = ["Apple", "Orange", "Pear", "Kiwi"] @@ -647,7 +645,6 @@ Converts a [float] to a string representation of a decimal number, with the number of decimal places specified in [param decimals]. If [param decimals] is [code]-1[/code] as by default, the string representation may only have up to 14 significant digits, with digits before the decimal point having priority over digits after. Trailing zeros are not included in the string. The last digit is rounded, not truncated. - [b]Example:[/b] [codeblock] String.num(3.141593) # Returns "3.141593" String.num(3.141593, 3) # Returns "3.142" @@ -802,7 +799,6 @@ Splits the string using a [param delimiter] and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If [param delimiter] is an empty string, each substring will be a single character. If [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array. If [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split, which is mostly identical to [method split]. - [b]Example:[/b] [codeblocks] [gdscript] var some_string = "One,Two,Three,Four" @@ -882,7 +878,6 @@ Splits the string using a [param delimiter] and returns an array of the substrings. If [param delimiter] is an empty string, each substring will be a single character. This method is the opposite of [method join]. If [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array. If [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split. - [b]Example:[/b] [codeblocks] [gdscript] var some_array = "One,Two,Three,Four".split(",", true, 2) diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index 76586b7968..836ca6b4ba 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -301,7 +301,6 @@ <description> Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist. This is faster than [method split], if you only need one substring. - [b]Example:[/b] [codeblock] print("i/am/example/hi".get_slice("/", 2)) # Prints "example" [/codeblock] @@ -496,7 +495,6 @@ <param index="0" name="parts" type="PackedStringArray" /> <description> Returns the concatenation of [param parts]' elements, with each element separated by the string calling this method. This method is the opposite of [method split]. - [b]Example:[/b] [codeblocks] [gdscript] var fruits = ["Apple", "Orange", "Pear", "Kiwi"] @@ -703,7 +701,6 @@ Splits the string using a [param delimiter] and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If [param delimiter] is an empty string, each substring will be a single character. If [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array. If [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split, which is mostly identical to [method split]. - [b]Example:[/b] [codeblocks] [gdscript] var some_string = "One,Two,Three,Four" @@ -783,7 +780,6 @@ Splits the string using a [param delimiter] and returns an array of the substrings. If [param delimiter] is an empty string, each substring will be a single character. This method is the opposite of [method join]. If [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array. If [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split. - [b]Example:[/b] [codeblocks] [gdscript] var some_array = "One,Two,Three,Four".split(",", true, 2) diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 181e1ff77a..8c629b12c5 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -5,8 +5,7 @@ </brief_description> <description> By configuring various properties of this style box, you can achieve many common looks without the need of a texture. This includes optionally rounded borders, antialiasing, shadows, and skew. - Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. - [b]Example:[/b] + Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system: [codeblock lang=text] height = 30 corner_radius_top_left = 50 diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index ac16bebecb..86a8130acc 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -183,7 +183,6 @@ <return type="Tween" /> <description> Makes the next [Tweener] run parallelly to the previous one. - [b]Example:[/b] [codeblocks] [gdscript] var tween = create_tween() @@ -410,7 +409,6 @@ <param index="3" name="duration" type="float" /> <description> Creates and appends a [PropertyTweener]. This method tweens a [param property] of an [param object] between an initial value and [param final_val] in a span of time equal to [param duration], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts. - [b]Example:[/b] [codeblocks] [gdscript] var tween = create_tween() |