Fix the doc descriptions where they got lost due to adding StringName to Variants. Also fixed smaller issues where I ran into them.

This commit is contained in:
Relintai 2023-12-21 00:48:25 +01:00
parent 4f6d95d77e
commit cf76e6debf
39 changed files with 433 additions and 0 deletions

View File

@ -17,6 +17,7 @@
<argument index="0" name="anim" type="StringName" default="@&quot;&quot;" />
<argument index="1" name="backwards" type="bool" default="false" />
<description>
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse.
</description>
</method>
<method name="stop">

View File

@ -20,6 +20,7 @@
<return type="void" />
<argument index="0" name="anim" type="StringName" default="@&quot;&quot;" />
<description>
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played.
</description>
</method>
<method name="stop">

View File

@ -42,6 +42,7 @@
<argument index="1" name="time" type="float" />
<argument index="2" name="animation" type="StringName" />
<description>
Inserts a key with value [code]animation[/code] at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="animation_track_set_key_animation">
@ -50,6 +51,7 @@
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="animation" type="StringName" />
<description>
Sets the key identified by [code]key_idx[/code] to value [code]animation[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="audio_track_get_key_end_offset" qualifiers="const">

View File

@ -26,6 +26,7 @@
<argument index="3" name="seeked" type="bool" />
<argument index="4" name="blend" type="float" />
<description>
Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened.
</description>
</method>
<method name="blend_input">
@ -50,6 +51,7 @@
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
<argument index="6" name="optimize" type="bool" default="true" />
<description>
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition.
</description>
</method>
<method name="get_caption" qualifiers="virtual">
@ -146,6 +148,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes.
</description>
</method>
</methods>

View File

@ -17,6 +17,7 @@
<argument index="1" name="node" type="AnimationNode" />
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
<description>
Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later.
</description>
</method>
<method name="connect_node">
@ -25,6 +26,7 @@
<argument index="1" name="input_index" type="int" />
<argument index="2" name="output_node" type="StringName" />
<description>
Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code].
</description>
</method>
<method name="disconnect_node">
@ -32,30 +34,35 @@
<argument index="0" name="input_node" type="StringName" />
<argument index="1" name="input_index" type="int" />
<description>
Disconnects the node connected to the specified input.
</description>
</method>
<method name="get_node" qualifiers="const">
<return type="AnimationNode" />
<argument index="0" name="name" type="StringName" />
<description>
Returns the sub-node with the specified [code]name[/code].
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="name" type="StringName" />
<description>
Returns the position of the sub-node with the specified [code]name[/code].
</description>
</method>
<method name="has_node" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists.
</description>
</method>
<method name="remove_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes a sub-node.
</description>
</method>
<method name="rename_node">
@ -63,6 +70,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="new_name" type="StringName" />
<description>
Changes the name of a sub-node.
</description>
</method>
<method name="set_node_position">
@ -70,6 +78,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="position" type="Vector2" />
<description>
Modifies the position of a sub-node.
</description>
</method>
</methods>

View File

@ -21,6 +21,7 @@
<argument index="1" name="node" type="AnimationNode" />
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
<description>
Adds a new node to the graph. The [code]position[/code] is used for display in the editor.
</description>
</method>
<method name="add_transition">
@ -29,6 +30,7 @@
<argument index="1" name="to" type="StringName" />
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition" />
<description>
Adds a transition between the given nodes.
</description>
</method>
<method name="get_end_node" qualifiers="const">
@ -47,6 +49,7 @@
<return type="AnimationNode" />
<argument index="0" name="name" type="StringName" />
<description>
Returns the animation node with the given name.
</description>
</method>
<method name="get_node_name" qualifiers="const">
@ -60,6 +63,7 @@
<return type="Vector2" />
<argument index="0" name="name" type="StringName" />
<description>
Returns the given node's coordinates. Used for display in the editor.
</description>
</method>
<method name="get_start_node" qualifiers="const">
@ -99,6 +103,7 @@
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if the graph contains the given node.
</description>
</method>
<method name="has_transition" qualifiers="const">
@ -106,12 +111,14 @@
<argument index="0" name="from" type="StringName" />
<argument index="1" name="to" type="StringName" />
<description>
Returns [code]true[/code] if there is a transition between the given nodes.
</description>
</method>
<method name="remove_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Deletes the given node from the graph.
</description>
</method>
<method name="remove_transition">
@ -119,6 +126,7 @@
<argument index="0" name="from" type="StringName" />
<argument index="1" name="to" type="StringName" />
<description>
Deletes the transition between the two specified nodes.
</description>
</method>
<method name="remove_transition_by_index">
@ -133,6 +141,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="new_name" type="StringName" />
<description>
Renames the given node.
</description>
</method>
<method name="replace_node">
@ -140,12 +149,14 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="node" type="AnimationNode" />
<description>
Replaces the node and keeps its transitions unchanged.
</description>
</method>
<method name="set_end_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Sets the given node as the graph end point.
</description>
</method>
<method name="set_graph_offset">
@ -160,12 +171,14 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="position" type="Vector2" />
<description>
Sets the node's coordinates. Used for display in the editor.
</description>
</method>
<method name="set_start_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Sets the given node as the graph start point.
</description>
</method>
</methods>

View File

@ -48,6 +48,7 @@
<return type="void" />
<argument index="0" name="node" type="StringName" />
<description>
Starts playing the given animation.
</description>
</method>
<method name="stop">
@ -60,6 +61,7 @@
<return type="void" />
<argument index="0" name="to_node" type="StringName" />
<description>
Transitions from the current state to another one, following the shortest path.
</description>
</method>
</methods>

View File

@ -19,6 +19,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="animation" type="Animation" />
<description>
Adds [code]animation[/code] to the player accessible with the key [code]name[/code].
</description>
</method>
<method name="advance">
@ -32,6 +33,7 @@
<return type="StringName" />
<argument index="0" name="anim_from" type="StringName" />
<description>
Returns the name of the next animation in the queue.
</description>
</method>
<method name="animation_set_next">
@ -39,6 +41,7 @@
<argument index="0" name="anim_from" type="StringName" />
<argument index="1" name="anim_to" type="StringName" />
<description>
Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes.
</description>
</method>
<method name="clear_caches">
@ -64,6 +67,7 @@
<return type="Animation" />
<argument index="0" name="name" type="StringName" />
<description>
Returns the [Animation] with the key [code]name[/code]. If the animation does not exist, [code]null[/code] is returned and an error is logged.
</description>
</method>
<method name="get_animation_list" qualifiers="const">
@ -77,6 +81,7 @@
<argument index="0" name="anim_from" type="StringName" />
<argument index="1" name="anim_to" type="StringName" />
<description>
Gets the blend time (in seconds) between two animations, referenced by their names.
</description>
</method>
<method name="get_playing_speed" qualifiers="const">
@ -95,6 +100,7 @@
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code].
</description>
</method>
<method name="is_playing" qualifiers="const">
@ -110,6 +116,9 @@
<argument index="2" name="custom_speed" type="float" default="1.0" />
<argument index="3" name="from_end" type="bool" default="false" />
<description>
Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).
The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing.
[b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code].
</description>
</method>
<method name="play_backwards">
@ -117,18 +126,23 @@
<argument index="0" name="name" type="StringName" default="&quot;&quot;" />
<argument index="1" name="custom_blend" type="float" default="-1" />
<description>
Plays the animation with key [code]name[/code] in reverse.
This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information.
</description>
</method>
<method name="queue">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Queues an animation for playback once the current one is done.
[b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow.
</description>
</method>
<method name="remove_animation">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes the animation with key [code]name[/code].
</description>
</method>
<method name="rename_animation">
@ -136,6 +150,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="newname" type="StringName" />
<description>
Renames an existing animation with key [code]name[/code] to [code]newname[/code].
</description>
</method>
<method name="seek">
@ -153,6 +168,7 @@
<argument index="1" name="anim_to" type="StringName" />
<argument index="2" name="sec" type="float" />
<description>
Specifies a blend time (in seconds) between two animations, referenced by their names.
</description>
</method>
<method name="stop">

View File

@ -33,6 +33,7 @@
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added.
</description>
</method>
<method name="add_surface_from_arrays">
@ -85,6 +86,7 @@
<argument index="0" name="index" type="int" />
<argument index="1" name="name" type="StringName" />
<description>
Sets the name of the specified blend shape.
</description>
</method>
<method name="surface_find_by_name" qualifiers="const">

View File

@ -77,6 +77,7 @@
<return type="int" />
<argument index="0" name="bus_name" type="StringName" />
<description>
Returns the index of the bus with the name [code]bus_name[/code].
</description>
</method>
<method name="get_bus_name" qualifiers="const">
@ -262,6 +263,7 @@
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="send" type="StringName" />
<description>
Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code].
</description>
</method>
<method name="set_bus_solo">

View File

@ -13,18 +13,21 @@
<return type="bool" />
<argument index="0" name="class" type="StringName" />
<description>
Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case.
</description>
</method>
<method name="class_exists" qualifiers="const">
<return type="bool" />
<argument index="0" name="class" type="StringName" />
<description>
Returns whether the specified [code]class[/code] is available or not.
</description>
</method>
<method name="class_get_category" qualifiers="const">
<return type="StringName" />
<argument index="0" name="class" type="StringName" />
<description>
Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required.
</description>
</method>
<method name="class_get_enum_constants" qualifiers="const">
@ -33,6 +36,7 @@
<argument index="1" name="enum" type="StringName" />
<argument index="2" name="no_inheritance" type="bool" default="false" />
<description>
Returns an array with all the keys in [code]enum[/code] of [code]class[/code] or its ancestry.
</description>
</method>
<method name="class_get_enum_list" qualifiers="const">
@ -40,6 +44,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="no_inheritance" type="bool" default="false" />
<description>
Returns an array with all the enums of [code]class[/code] or its ancestry.
</description>
</method>
<method name="class_get_integer_constant" qualifiers="const">
@ -47,6 +52,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="name" type="StringName" />
<description>
Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found.
</description>
</method>
<method name="class_get_integer_constant_enum" qualifiers="const">
@ -55,6 +61,7 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="no_inheritance" type="bool" default="false" />
<description>
Returns which enum the integer constant [code]name[/code] of [code]class[/code] or its ancestry belongs to.
</description>
</method>
<method name="class_get_integer_constant_list" qualifiers="const">
@ -62,6 +69,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="no_inheritance" type="bool" default="false" />
<description>
Returns an array with the names all the integer constants of [code]class[/code] or its ancestry.
</description>
</method>
<method name="class_get_method_list" qualifiers="const">
@ -69,6 +77,8 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="no_inheritance" type="bool" default="false" />
<description>
Returns an array with all the methods of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
[b]Note:[/b] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names.
</description>
</method>
<method name="class_get_property" qualifiers="const">
@ -76,6 +86,7 @@
<argument index="0" name="object" type="Object" />
<argument index="1" name="property" type="StringName" />
<description>
Returns the value of [code]property[/code] of [code]class[/code] or its ancestry.
</description>
</method>
<method name="class_get_property_list" qualifiers="const">
@ -83,6 +94,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="no_inheritance" type="bool" default="false" />
<description>
Returns an array with all the properties of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code].
</description>
</method>
<method name="class_get_signal" qualifiers="const">
@ -90,6 +102,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="signal" type="StringName" />
<description>
Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
</description>
</method>
<method name="class_get_signal_list" qualifiers="const">
@ -97,6 +110,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="no_inheritance" type="bool" default="false" />
<description>
Returns an array with all the signals of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal].
</description>
</method>
<method name="class_has_enum" qualifiers="const">
@ -105,6 +119,7 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="no_inheritance" type="bool" default="false" />
<description>
Returns whether [code]class[/code] or its ancestry has an enum called [code]name[/code] or not.
</description>
</method>
<method name="class_has_integer_constant" qualifiers="const">
@ -112,6 +127,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="name" type="StringName" />
<description>
Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not.
</description>
</method>
<method name="class_has_method" qualifiers="const">
@ -120,6 +136,7 @@
<argument index="1" name="method" type="StringName" />
<argument index="2" name="no_inheritance" type="bool" default="false" />
<description>
Returns whether [code]class[/code] (or its ancestry if [code]no_inheritance[/code] is [code]false[/code]) has a method called [code]method[/code] or not.
</description>
</method>
<method name="class_has_signal" qualifiers="const">
@ -127,6 +144,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="signal" type="StringName" />
<description>
Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not.
</description>
</method>
<method name="class_set_property" qualifiers="const">
@ -135,6 +153,7 @@
<argument index="1" name="property" type="StringName" />
<argument index="2" name="value" type="Variant" />
<description>
Sets [code]property[/code] value of [code]class[/code] to [code]value[/code].
</description>
</method>
<method name="get_class_list" qualifiers="const">
@ -147,24 +166,28 @@
<return type="PoolStringArray" />
<argument index="0" name="class" type="StringName" />
<description>
Returns the names of all the classes that directly or indirectly inherit from [code]class[/code].
</description>
</method>
<method name="get_parent_class" qualifiers="const">
<return type="StringName" />
<argument index="0" name="class" type="StringName" />
<description>
Returns the parent class of [code]class[/code].
</description>
</method>
<method name="instance" qualifiers="const">
<return type="Variant" />
<argument index="0" name="class" type="StringName" />
<description>
Creates an instance of [code]class[/code].
</description>
</method>
<method name="is_class_enabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="class" type="StringName" />
<description>
Returns whether this [code]class[/code] is enabled or not.
</description>
</method>
<method name="is_parent_class" qualifiers="const">
@ -172,6 +195,7 @@
<argument index="0" name="class" type="StringName" />
<argument index="1" name="inherits" type="StringName" />
<description>
Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not.
</description>
</method>
</methods>

View File

@ -91,6 +91,15 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="color" type="Color" />
<description>
Creates a local override for a theme [Color] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control.
See also [method get_color], [method remove_color_override].
[b]Example of overriding a label's color and resetting it later:[/b]
[codeblock]
# Given the child Label node "MyLabel", override its font color with a custom value.
$MyLabel.add_color_override("font_color", Color(1, 0.5, 0))
# Reset the font color of the child label.
$MyLabel.add_color_override("font_color", get_color("font_color", "Label"))
[/codeblock]
</description>
</method>
<method name="add_theme_constant_override">
@ -98,6 +107,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="constant" type="int" />
<description>
Creates a local override for a theme constant with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control.
See also [method get_constant], [method remove_constant_override].
</description>
</method>
<method name="add_theme_font_override">
@ -105,6 +116,9 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="font" type="Font" />
<description>
Creates a local override for a theme [Font] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control.
[b]Note:[/b] An override can be removed by assigning it a [code]null[/code] value, but use [method remove_font_override] instead.
See also [method get_font].
</description>
</method>
<method name="add_theme_icon_override">
@ -112,6 +126,9 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="texture" type="Texture" />
<description>
Creates a local override for a theme icon with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control.
[b]Note:[/b] An override can be removed by assigning it a [code]null[/code] value, but use [method remove_icon_override] instead.
See also [method get_icon].
</description>
</method>
<method name="add_theme_shader_override">
@ -119,6 +136,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="shader" type="Shader" />
<description>
Creates a local override for a theme shader with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control.
[b]Note:[/b] An override can be removed by assigning it a [code]null[/code] value, but use [method remove_shader_override] instead.
</description>
</method>
<method name="add_theme_stylebox_override">
@ -126,6 +145,21 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="stylebox" type="StyleBox" />
<description>
Creates a local override for a theme [StyleBox] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control.
[b]Note:[/b] An override can be removed by assigning it a [code]null[/code] value, but use [method remove_stylebox_override] instead.
See also [method get_stylebox].
[b]Example of modifying a property in a StyleBox by duplicating it:[/b]
[codeblock]
# The snippet below assumes the child node MyButton has a StyleBoxFlat assigned.
# Resources are shared across instances, so we need to duplicate it
# to avoid modifying the appearance of all other buttons.
var new_stylebox_normal = $MyButton.get_stylebox("normal").duplicate()
new_stylebox_normal.border_width_top = 3
new_stylebox_normal.border_color = Color(0, 1, 0.5)
$MyButton.add_stylebox_override("normal", new_stylebox_normal)
# Remove the stylebox override.
$MyButton.add_stylebox_override("normal", null)
[/codeblock]
</description>
</method>
<method name="can_drop_data" qualifiers="virtual">
@ -286,6 +320,15 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [code]name[/code] and [code]theme_type[/code]. If [code]theme_type[/code] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance.
For the current control its local overrides are considered first (see [method add_color_override]), then its assigned [member theme]. After the current control, each parent control and its assigned [member theme] are considered; controls without a [member theme] assigned are skipped. If no matching [Theme] is found in the tree, a custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used.
[codeblock]
func _ready():
# Get the font color defined for the current Control's class, if it exists.
modulate = get_color("font_color")
# Get the font color defined for the Button class.
modulate = get_color("font_color", "Button")
[/codeblock]
</description>
</method>
<method name="get_theme_constant" qualifiers="const">
@ -293,6 +336,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="get_theme_default_font" qualifiers="const">
@ -307,6 +352,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="get_theme_icon" qualifiers="const">
@ -314,6 +361,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="get_theme_stylebox" qualifiers="const">
@ -321,6 +370,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="get_tooltip" qualifiers="const">
@ -367,12 +418,16 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="has_theme_color_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [code]name[/code] in this [Control] node.
See [method add_color_override].
</description>
</method>
<method name="has_theme_constant" qualifiers="const">
@ -380,12 +435,16 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="has_theme_constant_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if there is a local override for a theme constant with the specified [code]name[/code] in this [Control] node.
See [method add_constant_override].
</description>
</method>
<method name="has_theme_font" qualifiers="const">
@ -393,12 +452,16 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="has_theme_font_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [code]name[/code] in this [Control] node.
See [method add_font_override].
</description>
</method>
<method name="has_theme_icon" qualifiers="const">
@ -406,18 +469,24 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="has_theme_icon_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if there is a local override for a theme icon with the specified [code]name[/code] in this [Control] node.
See [method add_icon_override].
</description>
</method>
<method name="has_theme_shader_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if there is a local override for a theme shader with the specified [code]name[/code] in this [Control] node.
See [method add_shader_override].
</description>
</method>
<method name="has_theme_stylebox" qualifiers="const">
@ -425,12 +494,16 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code].
See [method get_color] for details.
</description>
</method>
<method name="has_theme_stylebox_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [code]name[/code] in this [Control] node.
See [method add_stylebox_override].
</description>
</method>
<method name="is_drag_successful" qualifiers="const">
@ -461,36 +534,42 @@
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes a theme override for a [Color] with the given [code]name[/code].
</description>
</method>
<method name="remove_theme_constant_override">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes a theme override for a constant with the given [code]name[/code].
</description>
</method>
<method name="remove_theme_font_override">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes a theme override for a [Font] with the given [code]name[/code].
</description>
</method>
<method name="remove_theme_icon_override">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes a theme override for an icon with the given [code]name[/code].
</description>
</method>
<method name="remove_theme_shader_override">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes a theme override for a shader with the given [code]name[/code].
</description>
</method>
<method name="remove_theme_stylebox_override">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes a theme override for a [StyleBox] with the given [code]name[/code].
</description>
</method>
<method name="set_anchor">

View File

@ -23,6 +23,7 @@
<argument index="2" name="field" type="StringName" default="@&quot;&quot;" />
<argument index="3" name="changing" type="bool" default="false" />
<description>
If one or several properties have changed, this must be called. [code]field[/code] is used in case your editor can modify fields separately (as an example, Vector3.x). The [code]changing[/code] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure).
</description>
</method>
<method name="get_edited_object">

View File

@ -31,6 +31,8 @@
<argument index="2" name="receiver_func" type="StringName" />
<argument index="3" name="userdata" type="Variant" />
<description>
Queue the [code]resource[/code] being edited for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture] preview, [Texture] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called.
[b]Note:[/b] If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null.
</description>
</method>
<method name="queue_resource_preview">
@ -40,6 +42,8 @@
<argument index="2" name="receiver_func" type="StringName" />
<argument index="3" name="userdata" type="Variant" />
<description>
Queue a resource file located at [code]path[/code] for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture] preview, [Texture] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called.
[b]Note:[/b] If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null.
</description>
</method>
<method name="remove_preview_generator">

View File

@ -127,6 +127,7 @@
<argument index="1" name="value" type="Variant" />
<argument index="2" name="update_current" type="bool" />
<description>
Sets the initial value of the setting specified by [code]name[/code] to [code]value[/code]. This is used to provide a value for the Revert button in the Editor Settings. If [code]update_current[/code] is true, the current value of the setting will be set to [code]value[/code] as well.
</description>
</method>
<method name="set_project_metadata">

View File

@ -45,6 +45,7 @@
<argument index="2" name="to" type="StringName" />
<argument index="3" name="to_port" type="int" />
<description>
Create a connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection already exists, no connection is created.
</description>
</method>
<method name="disconnect_node">
@ -54,6 +55,7 @@
<argument index="2" name="to" type="StringName" />
<argument index="3" name="to_port" type="int" />
<description>
Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed.
</description>
</method>
<method name="get_connection_list" qualifiers="const">
@ -76,6 +78,7 @@
<argument index="2" name="to" type="StringName" />
<argument index="3" name="to_port" type="int" />
<description>
Returns [code]true[/code] if the [code]from_port[/code] slot of the [code]from[/code] GraphNode is connected to the [code]to_port[/code] slot of the [code]to[/code] GraphNode.
</description>
</method>
<method name="is_valid_connection_type" qualifiers="const">
@ -116,6 +119,7 @@
<argument index="3" name="to_port" type="int" />
<argument index="4" name="amount" type="float" />
<description>
Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property.
</description>
</method>
<method name="set_selected">

View File

@ -32,6 +32,8 @@
<argument index="0" name="action" type="StringName" />
<argument index="1" name="exact_match" type="bool" default="false" />
<description>
Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion].
If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_action" qualifiers="const">
@ -39,6 +41,8 @@
<argument index="0" name="action" type="StringName" />
<argument index="1" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] if this input event matches a pre-defined action of any type.
If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_action_pressed" qualifiers="const">
@ -47,6 +51,9 @@
<argument index="1" name="allow_echo" type="bool" default="false" />
<argument index="2" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
[b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_action_released" qualifiers="const">
@ -54,6 +61,8 @@
<argument index="0" name="action" type="StringName" />
<argument index="1" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_action_type" qualifiers="const">

View File

@ -15,6 +15,7 @@
<argument index="0" name="action" type="StringName" />
<argument index="1" name="event" type="InputEvent" />
<description>
Adds an [InputEvent] to an action. This [InputEvent] will trigger the action.
</description>
</method>
<method name="action_erase_event">
@ -22,18 +23,21 @@
<argument index="0" name="action" type="StringName" />
<argument index="1" name="event" type="InputEvent" />
<description>
Removes an [InputEvent] from an action.
</description>
</method>
<method name="action_erase_events">
<return type="void" />
<argument index="0" name="action" type="StringName" />
<description>
Removes all events from an action.
</description>
</method>
<method name="action_get_deadzone">
<return type="float" />
<argument index="0" name="action" type="StringName" />
<description>
Returns a deadzone value for the action.
</description>
</method>
<method name="action_has_event">
@ -41,6 +45,7 @@
<argument index="0" name="action" type="StringName" />
<argument index="1" name="event" type="InputEvent" />
<description>
Returns [code]true[/code] if the action has the given [InputEvent] associated with it.
</description>
</method>
<method name="action_set_deadzone">
@ -48,6 +53,7 @@
<argument index="0" name="action" type="StringName" />
<argument index="1" name="deadzone" type="float" />
<description>
Sets a deadzone value for the action.
</description>
</method>
<method name="add_action">
@ -55,12 +61,15 @@
<argument index="0" name="action" type="StringName" />
<argument index="1" name="deadzone" type="float" default="0.5" />
<description>
Adds an empty action to the [InputMap] with a configurable [code]deadzone[/code].
An [InputEvent] can then be added to this action with [method action_add_event].
</description>
</method>
<method name="erase_action">
<return type="void" />
<argument index="0" name="action" type="StringName" />
<description>
Removes an action from the [InputMap].
</description>
</method>
<method name="event_is_action" qualifiers="const">
@ -69,12 +78,16 @@
<argument index="1" name="action" type="StringName" />
<argument index="2" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="get_action_list">
<return type="Array" />
<argument index="0" name="action" type="StringName" />
<description>
Returns an array of [InputEvent]s associated with a given action.
[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the [code]input/*[/code] settings from [ProjectSettings].
</description>
</method>
<method name="get_actions">
@ -87,6 +100,7 @@
<return type="bool" />
<argument index="0" name="action" type="StringName" />
<description>
Returns [code]true[/code] if the [InputMap] has a registered action with the given name.
</description>
</method>
<method name="load_from_globals">

View File

@ -16,6 +16,7 @@
<argument index="0" name="object" type="Object" />
<argument index="1" name="method" type="StringName" />
<description>
Creates a reference to a script function that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [JavaScriptObject] for usage.
</description>
</method>
<method name="create_object" qualifiers="vararg">

View File

@ -160,6 +160,9 @@
<argument index="0" name="group" type="StringName" />
<argument index="1" name="persistent" type="bool" default="false" />
<description>
Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [method is_inside_tree]). See notes in the description, and the group methods in [SceneTree].
The [code]persistent[/code] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored.
[b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
</description>
</method>
<method name="can_process" qualifiers="const">
@ -416,6 +419,7 @@
<return type="bool" />
<argument index="0" name="group" type="StringName" />
<description>
Returns [code]true[/code] if this node is in the specified group. See notes in the description, and the group methods in [SceneTree].
</description>
</method>
<method name="is_inside_tree" qualifiers="const">
@ -573,6 +577,7 @@
<argument index="1" name="args" type="Array" default="[ ]" />
<argument index="2" name="parent_first" type="bool" default="false" />
<description>
Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the [code]parent_first[/code] argument is [code]true[/code], the method will be called on the current node first, then on all its children. If [code]parent_first[/code] is [code]false[/code], the children will be called first.
</description>
</method>
<method name="propagate_notification">
@ -614,6 +619,7 @@
<return type="void" />
<argument index="0" name="group" type="StringName" />
<description>
Removes a node from a group. See notes in the description, and the group methods in [SceneTree].
</description>
</method>
<method name="replace_by">
@ -645,6 +651,8 @@
<return type="Variant" />
<argument index="0" name="method" type="StringName" />
<description>
Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. See also [method rset] and [method rset_config] for properties. Returns [code]null[/code].
[b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [SceneTree]. You also need to keep track of the connection state, either by the [SceneTree] signals like [code]server_disconnected[/code] or by checking [code]SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED[/code].
</description>
</method>
<method name="rpc_config">
@ -652,6 +660,7 @@
<argument index="0" name="method" type="StringName" />
<argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode" />
<description>
Changes the RPC mode for the given [code]method[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). See also [method rset] and [method rset_config] for properties.
</description>
</method>
<method name="rpc_id" qualifiers="vararg">
@ -659,12 +668,14 @@
<argument index="0" name="peer_id" type="int" />
<argument index="1" name="method" type="StringName" />
<description>
Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns [code]null[/code].
</description>
</method>
<method name="rpc_unreliable" qualifiers="vararg">
<return type="Variant" />
<argument index="0" name="method" type="StringName" />
<description>
Sends a [method rpc] using an unreliable protocol. Returns [code]null[/code].
</description>
</method>
<method name="rpc_unreliable_id" qualifiers="vararg">
@ -672,64 +683,75 @@
<argument index="0" name="peer_id" type="int" />
<argument index="1" name="method" type="StringName" />
<description>
Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns [code]null[/code].
</description>
</method>
<method name="seen_by_add">
<return type="void" />
<argument index="0" name="entity" type="Node" />
<description>
Add a Node that is seen by this Node. Used by vrpcs.
</description>
</method>
<method name="seen_by_get">
<return type="Node" />
<argument index="0" name="index" type="int" />
<description>
Get a Node that is seen by this node. Used by vrpcs.
</description>
</method>
<method name="seen_by_get_count">
<return type="int" />
<description>
How many Nodes see this Node.
</description>
</method>
<method name="seen_by_remove">
<return type="void" />
<argument index="0" name="entity" type="Node" />
<description>
Remove a Node that is seen by this node. Used by vrpcs.
</description>
</method>
<method name="seen_by_remove_index">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
Remove a Node that is seen by this node. Used by vrpcs.
</description>
</method>
<method name="sees_add">
<return type="void" />
<argument index="0" name="entity" type="Node" />
<description>
Add a Node that this Node sees. Used by vrpcs.
</description>
</method>
<method name="sees_get">
<return type="Node" />
<argument index="0" name="index" type="int" />
<description>
Get a Node that this Node sees. Used by vrpcs.
</description>
</method>
<method name="sees_get_count">
<return type="int" />
<description>
How many Nodes this Node sees.
</description>
</method>
<method name="sees_remove">
<return type="void" />
<argument index="0" name="entity" type="Node" />
<description>
Remove a Node that this Node sees. Used by vrpcs.
</description>
</method>
<method name="sees_remove_index">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
Remove a Node that this Node sees. Used by vrpcs.
</description>
</method>
<method name="set_display_folded">
@ -855,12 +877,14 @@
<return type="Variant" />
<argument index="0" name="method" type="StringName" />
<description>
Same as [method rpc] but it will only send the call to clients that see ([mehod seen_by_add]) this Node. (v = visibility)
</description>
</method>
<method name="vrpc_unreliable" qualifiers="vararg">
<return type="Variant" />
<argument index="0" name="method" type="StringName" />
<description>
Same as [method rpc_unreliable] but it will only send the call to clients that see ([mehod seen_by_add]) this Node. (v = visibility)
</description>
</method>
</methods>

View File

@ -29,6 +29,8 @@
<return type="Variant" />
<argument index="0" name="property" type="StringName" />
<description>
Virtual method which can be overridden to customize the return value of [method get].
Returns the given property. Returns [code]null[/code] if the [code]property[/code] does not exist.
</description>
</method>
<method name="_get_property_list" qualifiers="virtual">
@ -58,6 +60,8 @@
<argument index="0" name="property" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
Virtual method which can be overridden to customize the return value of [method set].
Sets a property. Returns [code]true[/code] if the [code]property[/code] exists.
</description>
</method>
<method name="_to_string" qualifiers="virtual">
@ -79,12 +83,22 @@
<return type="Variant" />
<argument index="0" name="method" type="StringName" />
<description>
Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
[codeblock]
call("set", "position", Vector2(42.0, 0.0))
[/codeblock]
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
<method name="call_deferred" qualifiers="vararg">
<return type="void" />
<argument index="0" name="method" type="StringName" />
<description>
Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
[codeblock]
call_deferred("set", "position", Vector2(42.0, 0.0))
[/codeblock]
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
<method name="callv">
@ -92,6 +106,10 @@
<argument index="0" name="method" type="StringName" />
<argument index="1" name="arg_array" type="Array" />
<description>
Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].
[codeblock]
callv("set", [ "position", Vector2(42.0, 0.0) ])
[/codeblock]
</description>
</method>
<method name="can_translate_messages" qualifiers="const">
@ -114,6 +132,22 @@
<argument index="3" name="binds" type="Array" default="[ ]" />
<argument index="4" name="flags" type="int" default="0" />
<description>
Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
A [code]signal[/code] can only be connected once to a [code]method[/code]. It will print an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost.
Examples:
[codeblock]
connect("pressed", self, "_on_Button_pressed") # BaseButton signal
connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal
[/codeblock]
An example of the relationship between [code]binds[/code] passed to [method connect] and parameters used when calling [method emit_signal]:
[codeblock]
connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last
emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first
func _on_Player_hit(hit_by, level, weapon_type, damage):
print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage])
[/codeblock]
</description>
</method>
<method name="disconnect">
@ -122,12 +156,19 @@
<argument index="1" name="target" type="Object" />
<argument index="2" name="method" type="StringName" />
<description>
Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code].
If you try to disconnect a connection that does not exist, the method will print an error. Use [method is_connected] to ensure that the connection exists.
</description>
</method>
<method name="emit_signal" qualifiers="vararg">
<return type="void" />
<argument index="0" name="signal" type="StringName" />
<description>
Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
[codeblock]
emit_signal("hit", weapon_type, damage)
emit_signal("game_over")
[/codeblock]
</description>
</method>
<method name="free">
@ -235,18 +276,21 @@
<return type="bool" />
<argument index="0" name="method" type="StringName" />
<description>
Returns [code]true[/code] if the object contains the given [code]method[/code].
</description>
</method>
<method name="has_signal" qualifiers="const">
<return type="bool" />
<argument index="0" name="signal" type="StringName" />
<description>
Returns [code]true[/code] if the given [code]signal[/code] exists.
</description>
</method>
<method name="has_user_signal" qualifiers="const">
<return type="bool" />
<argument index="0" name="signal" type="StringName" />
<description>
Returns [code]true[/code] if the given user-defined [code]signal[/code] exists. Only signals added using [method add_user_signal] are taken into account.
</description>
</method>
<method name="is_blocking_signals" qualifiers="const">
@ -269,6 +313,7 @@
<argument index="1" name="target" type="Object" />
<argument index="2" name="method" type="StringName" />
<description>
Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code].
</description>
</method>
<method name="is_queued_for_deletion" qualifiers="const">
@ -320,6 +365,8 @@
<argument index="0" name="property" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/code].
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
<method name="set_indexed">

View File

@ -150,6 +150,12 @@
<argument index="1" name="receiver" type="Object" />
<argument index="2" name="method" type="StringName" />
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
2: [RID] of the object that entered/exited the area.
3: Instance ID of the object that entered/exited the area.
4: The shape index of the object that entered/exited the area.
5: The shape index of the area where the object entered/exited.
</description>
</method>
<method name="area_set_monitorable">
@ -483,6 +489,7 @@
<argument index="2" name="method" type="StringName" />
<argument index="3" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
</description>
</method>
<method name="body_set_max_contacts_reported">

View File

@ -144,6 +144,12 @@
<argument index="1" name="receiver" type="Object" />
<argument index="2" name="method" type="StringName" />
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
2: [RID] of the object that entered/exited the area.
3: Instance ID of the object that entered/exited the area.
4: The shape index of the object that entered/exited the area.
5: The shape index of the area where the object entered/exited.
</description>
</method>
<method name="area_set_monitorable">
@ -494,6 +500,7 @@
<argument index="2" name="method" type="StringName" />
<argument index="3" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
</description>
</method>
<method name="body_set_kinematic_safe_margin">

View File

@ -1571,6 +1571,7 @@
<argument index="0" name="material" type="RID" />
<argument index="1" name="parameter" type="StringName" />
<description>
Returns the value of a certain material's parameter.
</description>
</method>
<method name="material_get_param_default" qualifiers="const">
@ -1578,6 +1579,7 @@
<argument index="0" name="material" type="RID" />
<argument index="1" name="parameter" type="StringName" />
<description>
Returns the default value for the param if available. Returns [code]null[/code] otherwise.
</description>
</method>
<method name="material_get_shader" qualifiers="const">
@ -1609,6 +1611,7 @@
<argument index="1" name="parameter" type="StringName" />
<argument index="2" name="value" type="Variant" />
<description>
Sets a material's parameter.
</description>
</method>
<method name="material_set_render_priority">
@ -2136,6 +2139,8 @@
<argument index="1" name="method" type="StringName" />
<argument index="2" name="userdata" type="Variant" />
<description>
Schedules a callback to the corresponding named [code]method[/code] on [code]where[/code] after a frame has been drawn.
The callback method must use only 1 argument which will be called with [code]userdata[/code].
</description>
</method>
<method name="scenario_create">
@ -2246,6 +2251,7 @@
<argument index="0" name="shader" type="RID" />
<argument index="1" name="name" type="StringName" />
<description>
Returns a default texture from a shader searched by name.
</description>
</method>
<method name="shader_get_param_list" qualifiers="const">
@ -2269,6 +2275,7 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="texture" type="RID" />
<description>
Sets a shader's default texture. Overwrites the texture given by name.
</description>
</method>
<method name="skeleton_allocate">

View File

@ -38,6 +38,8 @@
<return type="bool" />
<argument index="0" name="typename" type="StringName" />
<description>
Tells which resource class this loader can load.
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them.
</description>
</method>
<method name="load" qualifiers="virtual">

View File

@ -15,12 +15,14 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="resource" type="Resource" />
<description>
Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2.
</description>
</method>
<method name="get_resource" qualifiers="const">
<return type="Resource" />
<argument index="0" name="name" type="StringName" />
<description>
Returns the resource associated to [code]name[/code].
</description>
</method>
<method name="get_resource_list" qualifiers="const">
@ -33,12 +35,14 @@
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code].
</description>
</method>
<method name="remove_resource">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Removes the resource associated to [code]name[/code] from the preloader.
</description>
</method>
<method name="rename_resource">
@ -46,6 +50,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="newname" type="StringName" />
<description>
Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
</description>
</method>
</methods>

View File

@ -18,6 +18,10 @@
<argument index="0" name="group" type="StringName" />
<argument index="1" name="method" type="StringName" />
<description>
Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. This method is equivalent of calling [method call_group_flags] with [constant GROUP_CALL_DEFAULT] flag.
[b]Note:[/b] [code]method[/code] may only have 5 arguments at most (7 arguments passed to this method in total).
[b]Note:[/b] Due to design limitations, [method call_group] will fail silently if one of the arguments is [code]null[/code].
[b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag.
</description>
</method>
<method name="call_group_flags" qualifiers="vararg">
@ -26,6 +30,13 @@
<argument index="1" name="group" type="StringName" />
<argument index="2" name="method" type="StringName" />
<description>
Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call.
[b]Note:[/b] [code]method[/code] may only have 5 arguments at most (8 arguments passed to this method in total).
[b]Note:[/b] Due to design limitations, [method call_group_flags] will fail silently if one of the arguments is [code]null[/code].
[codeblock]
# Call the method immediately and in reverse order.
get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy")
[/codeblock]
</description>
</method>
<method name="change_scene">
@ -103,6 +114,7 @@
<return type="Array" />
<argument index="0" name="group" type="StringName" />
<description>
Returns a list of all nodes assigned to the given group.
</description>
</method>
<method name="get_processed_tweens">
@ -121,6 +133,7 @@
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if the given group exists.
</description>
</method>
<method name="has_network_peer" qualifiers="const">
@ -146,6 +159,7 @@
<argument index="0" name="group" type="StringName" />
<argument index="1" name="notification" type="int" />
<description>
Sends the given notification to all members of the [code]group[/code].
</description>
</method>
<method name="notify_group_flags">
@ -154,6 +168,7 @@
<argument index="1" name="group" type="StringName" />
<argument index="2" name="notification" type="int" />
<description>
Sends the given notification to all members of the [code]group[/code], respecting the given [enum GroupCallFlags].
</description>
</method>
<method name="queue_delete">
@ -184,6 +199,7 @@
<argument index="1" name="property" type="String" />
<argument index="2" name="value" type="Variant" />
<description>
Sets the given [code]property[/code] to [code]value[/code] on all members of the given group.
</description>
</method>
<method name="set_group_flags">
@ -193,6 +209,7 @@
<argument index="2" name="property" type="String" />
<argument index="3" name="value" type="Variant" />
<description>
Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags].
</description>
</method>
<method name="set_input_as_handled">

View File

@ -214,6 +214,18 @@
<argument index="1" name="method" type="StringName" />
<argument index="2" name="binds" type="Array" default="[ ]" />
<description>
Creates and appends a [CallbackTweener]. This method can be used to call an arbitrary method in any object. Use [code]binds[/code] to bind additional arguments for the call.
Example: object that keeps shooting every 1 second.
[codeblock]
var tween = get_tree().create_tween().set_loops()
tween.tween_callback(self, "shoot").set_delay(1)
[/codeblock]
Example: turning a sprite red and then blue, with 2 second delay.
[codeblock]
var tween = get_tree().create_tween()
tween.tween_callback($Sprite, "set_modulate", [Color.red]).set_delay(2)
tween.tween_callback($Sprite, "set_modulate", [Color.blue]).set_delay(2)
[/codeblock]
</description>
</method>
<method name="tween_interval">
@ -248,6 +260,21 @@
<argument index="4" name="duration" type="float" />
<argument index="5" name="binds" type="Array" default="[ ]" />
<description>
Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [code]from[/code] and [code]to[/code] over the time specified by [code]duration[/code], in seconds. Use [code]binds[/code] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening.
Example: making a 3D object look from one point to another point.
[codeblock]
var tween = create_tween()
tween.tween_method(self, "look_at", Vector3(-1, 0, -1), Vector3(1, 0, -1), 1, [Vector3.UP]) # The look_at() method takes up vector as second argument.
[/codeblock]
Example: setting a text of a [Label], using an intermediate method and after a delay.
[codeblock]
func _ready():
var tween = create_tween()
tween.tween_method(self, "set_label_text", 0, 10, 1).set_delay(1)
func set_label_text(value: int):
$Label.text = "Counting " + str(value)
[/codeblock]
</description>
</method>
<method name="tween_property">

View File

@ -33,6 +33,7 @@
<return type="Variant" />
<argument index="0" name="property" type="StringName" />
<description>
Returns the default value of the specified property.
</description>
</method>
<method name="get_script_constant_map">
@ -63,6 +64,7 @@
<return type="bool" />
<argument index="0" name="signal_name" type="StringName" />
<description>
Returns [code]true[/code] if the script, or a base class, defines a signal with the given name.
</description>
</method>
<method name="has_source_code" qualifiers="const">

View File

@ -15,6 +15,8 @@
<return type="Texture" />
<argument index="0" name="param" type="StringName" />
<description>
Returns the texture that is set as default for the specified parameter.
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
</description>
</method>
<method name="get_mode" qualifiers="const">
@ -27,6 +29,8 @@
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if the shader has this param defined as a uniform in its code.
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
</description>
</method>
<method name="set_default_texture_param">
@ -34,6 +38,8 @@
<argument index="0" name="param" type="StringName" />
<argument index="1" name="texture" type="Texture" />
<description>
Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial].
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
</description>
</method>
</methods>

View File

@ -15,6 +15,7 @@
<return type="Variant" />
<argument index="0" name="param" type="StringName" />
<description>
Returns the current value set for this material of a uniform in the shader.
</description>
</method>
<method name="property_can_revert">
@ -36,6 +37,8 @@
<argument index="0" name="param" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
Changes the value set for this material of a uniform in the shader.
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
</description>
</method>
</methods>

View File

@ -14,6 +14,7 @@
<return type="void" />
<argument index="0" name="anim" type="StringName" />
<description>
Adds a new animation to the library.
</description>
</method>
<method name="add_frame">
@ -22,12 +23,14 @@
<argument index="1" name="frame" type="Texture" />
<argument index="2" name="at_position" type="int" default="-1" />
<description>
Adds a frame to the given animation.
</description>
</method>
<method name="clear">
<return type="void" />
<argument index="0" name="anim" type="StringName" />
<description>
Removes all frames from the given animation.
</description>
</method>
<method name="clear_all">
@ -40,6 +43,7 @@
<return type="bool" />
<argument index="0" name="anim" type="StringName" />
<description>
Returns [code]true[/code] if the given animation is configured to loop when it finishes playing. Otherwise, returns [code]false[/code].
</description>
</method>
<method name="get_animation_names" qualifiers="const">
@ -52,6 +56,7 @@
<return type="float" />
<argument index="0" name="anim" type="StringName" />
<description>
The animation's speed in frames per second.
</description>
</method>
<method name="get_frame" qualifiers="const">
@ -59,24 +64,28 @@
<argument index="0" name="anim" type="StringName" />
<argument index="1" name="idx" type="int" />
<description>
Returns the animation's selected frame.
</description>
</method>
<method name="get_frame_count" qualifiers="const">
<return type="int" />
<argument index="0" name="anim" type="StringName" />
<description>
Returns the number of frames in the animation.
</description>
</method>
<method name="has_animation" qualifiers="const">
<return type="bool" />
<argument index="0" name="anim" type="StringName" />
<description>
If [code]true[/code], the named animation exists.
</description>
</method>
<method name="remove_animation">
<return type="void" />
<argument index="0" name="anim" type="StringName" />
<description>
Removes the given animation.
</description>
</method>
<method name="remove_frame">
@ -84,6 +93,7 @@
<argument index="0" name="anim" type="StringName" />
<argument index="1" name="idx" type="int" />
<description>
Removes the animation's selected frame.
</description>
</method>
<method name="rename_animation">
@ -91,6 +101,7 @@
<argument index="0" name="anim" type="StringName" />
<argument index="1" name="newname" type="StringName" />
<description>
Changes the animation's name to [code]newname[/code].
</description>
</method>
<method name="set_animation_loop">
@ -98,6 +109,7 @@
<argument index="0" name="anim" type="StringName" />
<argument index="1" name="loop" type="bool" />
<description>
If [code]true[/code], the animation will loop.
</description>
</method>
<method name="set_animation_speed">
@ -105,6 +117,7 @@
<argument index="0" name="anim" type="StringName" />
<argument index="1" name="speed" type="float" />
<description>
The animation's speed in frames per second.
</description>
</method>
<method name="set_frame">
@ -113,6 +126,7 @@
<argument index="1" name="idx" type="int" />
<argument index="2" name="txt" type="Texture" />
<description>
Sets the texture of the given frame.
</description>
</method>
</methods>

View File

@ -215,6 +215,7 @@
<return type="String" />
<argument index="0" name="from" type="StringName" />
<description>
Constructs a new String from the given [StringName].
</description>
</method>
<method name="String">

View File

@ -15,6 +15,8 @@
<return type="void" />
<argument index="0" name="theme_type" type="StringName" />
<description>
Adds an empty theme type for every valid data type.
[b]Note:[/b] Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available [code]set_*[/code] methods to add theme items.
</description>
</method>
<method name="clear">
@ -28,6 +30,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Clears the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_constant">
@ -35,6 +38,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Clears the constant at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_font">
@ -42,6 +46,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Clears the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_icon">
@ -49,6 +54,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Clears the icon at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_stylebox">
@ -56,6 +62,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Clears [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_theme_item">
@ -64,12 +71,14 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="clear_type_variation">
<return type="void" />
<argument index="0" name="theme_type" type="StringName" />
<description>
Unmarks [code]theme_type[/code] as being a variation of another theme type. See [method set_type_variation].
</description>
</method>
<method name="copy_default_theme">
@ -90,6 +99,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_color_list" qualifiers="const">
@ -110,6 +120,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_constant_list" qualifiers="const">
@ -130,6 +141,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. If such item does not exist and [member default_font] is set on the theme, the default font will be returned.
</description>
</method>
<method name="get_font_list" qualifiers="const">
@ -150,6 +162,7 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns the icon [Texture] at [code]name[/code] if the theme has [code]theme_type[/code].
</description>
</method>
<method name="get_icon_list" qualifiers="const">
@ -170,6 +183,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_types].
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
@ -192,6 +207,8 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code].
Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]theme_type[/code]s may be found using [method get_theme_item_types] or a data type specific method.
</description>
</method>
<method name="get_theme_item_list" qualifiers="const">
@ -222,12 +239,14 @@
<return type="StringName" />
<argument index="0" name="theme_type" type="StringName" />
<description>
Returns the name of the base theme type if [code]theme_type[/code] is a valid variation type. Returns an empty string otherwise.
</description>
</method>
<method name="get_type_variation_list" qualifiers="const">
<return type="PoolStringArray" />
<argument index="0" name="base_type" type="StringName" />
<description>
Returns a list of all type variations for the given [code]base_type[/code].
</description>
</method>
<method name="has_color" qualifiers="const">
@ -235,6 +254,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code].
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_constant" qualifiers="const">
@ -242,6 +263,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code].
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_default_font" qualifiers="const">
@ -255,6 +278,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_icon" qualifiers="const">
@ -262,6 +287,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]theme_type[/code].
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_stylebox" qualifiers="const">
@ -269,6 +296,8 @@
<argument index="0" name="name" type="StringName" />
<argument index="1" name="theme_type" type="StringName" />
<description>
Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code].
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="has_theme_item" qualifiers="const">
@ -277,6 +306,8 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]theme_type[/code].
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
<method name="is_type_variation" qualifiers="const">
@ -284,6 +315,7 @@
<argument index="0" name="theme_type" type="StringName" />
<argument index="1" name="base_type" type="StringName" />
<description>
Returns [code]true[/code] if [code]theme_type[/code] is marked as a variation of [code]base_type[/code].
</description>
</method>
<method name="merge_with">
@ -298,6 +330,7 @@
<return type="void" />
<argument index="0" name="theme_type" type="StringName" />
<description>
Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base.
</description>
</method>
<method name="rename_color">
@ -306,6 +339,7 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_constant">
@ -314,6 +348,7 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_font">
@ -322,6 +357,7 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_icon">
@ -330,6 +366,7 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_stylebox">
@ -338,6 +375,7 @@
<argument index="1" name="name" type="StringName" />
<argument index="2" name="theme_type" type="StringName" />
<description>
Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="rename_theme_item">
@ -347,6 +385,7 @@
<argument index="2" name="name" type="StringName" />
<argument index="3" name="theme_type" type="StringName" />
<description>
Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="set_color">
@ -355,6 +394,8 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="color" type="Color" />
<description>
Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]theme_type[/code].
Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_constant">
@ -363,6 +404,8 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="constant" type="int" />
<description>
Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]theme_type[/code].
Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_font">
@ -371,6 +414,8 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="font" type="Font" />
<description>
Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]theme_type[/code].
Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_icon">
@ -379,6 +424,8 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="texture" type="Texture" />
<description>
Sets the theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]theme_type[/code].
Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_stylebox">
@ -387,6 +434,8 @@
<argument index="1" name="theme_type" type="StringName" />
<argument index="2" name="texture" type="StyleBox" />
<description>
Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]theme_type[/code].
Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_theme_item">
@ -396,6 +445,9 @@
<argument index="2" name="theme_type" type="StringName" />
<argument index="3" name="value" type="Variant" />
<description>
Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]theme_type[/code].
Does nothing if the [code]value[/code] type does not match [code]data_type[/code].
Creates [code]theme_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_type_variation">
@ -403,6 +455,10 @@
<argument index="0" name="theme_type" type="StringName" />
<argument index="1" name="base_type" type="StringName" />
<description>
Marks [code]theme_type[/code] as a variation of [code]base_type[/code].
This adds [code]theme_type[/code] as a suggested option for [member Control.theme_type_variation] on a [Control] that is of the [code]base_type[/code] class.
Variations can also be nested, i.e. [code]base_type[/code] can be another variation. If a chain of variations ends with a [code]base_type[/code] matching the class of the [Control], the whole chain is going to be suggested as options.
[b]Note:[/b] Suggestions only show up if this theme resource is set as the project default theme. See [member ProjectSettings.gui/theme/custom].
</description>
</method>
</methods>

View File

@ -38,6 +38,8 @@
<argument index="2" name="userdata" type="Variant" default="null" />
<argument index="3" name="priority" type="int" enum="Thread.Priority" default="1" />
<description>
Starts a new [Thread] that runs [code]method[/code] on object [code]instance[/code] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]method[/code] must accept one argument and it will be null. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.
</description>
</method>
<method name="wait_to_finish">

View File

@ -26,6 +26,7 @@
<return type="Variant" />
<argument index="0" name="method" type="StringName" />
<description>
Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.
</description>
</method>
<method name="clear_custom_bg_color">
@ -373,6 +374,8 @@
<argument index="1" name="object" type="Object" />
<argument index="2" name="callback" type="StringName" />
<description>
Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code].
The [code]callback[/code] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
</description>
</method>
<method name="set_editable">

View File

@ -34,6 +34,8 @@
<argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2" />
<argument index="8" name="delay" type="float" default="0" />
<description>
Follows [code]method[/code] of [code]object[/code] and applies the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are called with consecutive values.
Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
</description>
</method>
<method name="follow_property">
@ -103,6 +105,8 @@
<argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2" />
<argument index="7" name="delay" type="float" default="0" />
<description>
Animates [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are called with consecutive values.
Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
</description>
</method>
<method name="interpolate_property">
@ -132,6 +136,7 @@
<argument index="0" name="object" type="Object" />
<argument index="1" name="key" type="StringName" default="&quot;&quot;" />
<description>
Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless [code]key[/code] is specified.
</description>
</method>
<method name="remove_all">
@ -159,6 +164,7 @@
<argument index="0" name="object" type="Object" />
<argument index="1" name="key" type="StringName" default="&quot;&quot;" />
<description>
Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless [code]key[/code] is specified.
</description>
</method>
<method name="resume_all">
@ -192,6 +198,7 @@
<argument index="0" name="object" type="Object" />
<argument index="1" name="key" type="StringName" default="&quot;&quot;" />
<description>
Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless [code]key[/code] is specified.
</description>
</method>
<method name="stop_all">
@ -212,6 +219,8 @@
<argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2" />
<argument index="8" name="delay" type="float" default="0" />
<description>
Animates [code]method[/code] of [code]object[/code] from the value returned by [code]initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecutive values.
Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information.
</description>
</method>
<method name="targeting_property">

View File

@ -45,6 +45,7 @@
<argument index="1" name="property" type="StringName" />
<argument index="2" name="value" type="Variant" />
<description>
Register a property value change for "do".
</description>
</method>
<method name="add_do_reference">
@ -59,6 +60,7 @@
<argument index="0" name="object" type="Object" />
<argument index="1" name="method" type="StringName" />
<description>
Register a method that will be called when the action is undone.
</description>
</method>
<method name="add_undo_property">
@ -67,6 +69,7 @@
<argument index="1" name="property" type="StringName" />
<argument index="2" name="value" type="Variant" />
<description>
Register a property value change for "undo".
</description>
</method>
<method name="add_undo_reference">

View File

@ -17,18 +17,21 @@
<return type="String" />
<argument index="0" name="method" type="StringName" />
<description>
Returns the documentation string that was previously set with [code]godot_nativescript_set_method_documentation[/code].
</description>
</method>
<method name="get_property_documentation" qualifiers="const">
<return type="String" />
<argument index="0" name="path" type="StringName" />
<description>
Returns the documentation string that was previously set with [code]godot_nativescript_set_property_documentation[/code].
</description>
</method>
<method name="get_signal_documentation" qualifiers="const">
<return type="String" />
<argument index="0" name="signal_name" type="StringName" />
<description>
Returns the documentation string that was previously set with [code]godot_nativescript_set_signal_documentation[/code].
</description>
</method>
<method name="new" qualifiers="vararg">