summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GDScript.xml1301
-rw-r--r--doc/classes/@NativeScript.xml13
-rw-r--r--doc/classes/@VisualScript.xml15
-rw-r--r--doc/classes/AStar.xml2
-rw-r--r--doc/classes/AStar2D.xml258
-rw-r--r--doc/classes/AcceptDialog.xml5
-rw-r--r--doc/classes/AnimationPlayer.xml9
-rw-r--r--doc/classes/Area.xml15
-rw-r--r--doc/classes/Area2D.xml23
-rw-r--r--doc/classes/AudioEffectPitchShift.xml16
-rw-r--r--doc/classes/CPUParticles2D.xml4
-rw-r--r--doc/classes/CameraFeed.xml4
-rw-r--r--doc/classes/CameraServer.xml4
-rw-r--r--doc/classes/ColorPicker.xml5
-rw-r--r--doc/classes/Engine.xml18
-rw-r--r--doc/classes/File.xml4
-rw-r--r--doc/classes/GDNativeLibraryResourceLoader.xml13
-rw-r--r--doc/classes/GDNativeLibraryResourceSaver.xml13
-rw-r--r--doc/classes/IP.xml16
-rw-r--r--doc/classes/ItemList.xml78
-rw-r--r--doc/classes/OS.xml6
-rw-r--r--doc/classes/Object.xml1
-rw-r--r--doc/classes/PacketPeerUDP.xml23
-rw-r--r--doc/classes/ReferenceRect.xml3
-rw-r--r--doc/classes/Resource.xml9
-rw-r--r--doc/classes/ResourceFormatDDS.xml13
-rw-r--r--doc/classes/ResourceFormatImporter.xml13
-rw-r--r--doc/classes/ResourceFormatLoader.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderBMFont.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderBinary.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderDynamicFont.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderGDScript.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderImage.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderNativeScript.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderShader.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderStreamTexture.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderText.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderTextureLayered.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderTheora.xml13
-rw-r--r--doc/classes/ResourceFormatLoaderWebm.xml13
-rw-r--r--doc/classes/ResourceFormatPKM.xml13
-rw-r--r--doc/classes/ResourceFormatPVR.xml13
-rw-r--r--doc/classes/ResourceFormatSaver.xml11
-rw-r--r--doc/classes/ResourceFormatSaverBinary.xml13
-rw-r--r--doc/classes/ResourceFormatSaverGDScript.xml13
-rw-r--r--doc/classes/ResourceFormatSaverNativeScript.xml13
-rw-r--r--doc/classes/ResourceFormatSaverShader.xml13
-rw-r--r--doc/classes/ResourceFormatSaverText.xml13
-rw-r--r--doc/classes/ResourceImporter.xml13
-rw-r--r--doc/classes/ResourceInteractiveLoader.xml16
-rw-r--r--doc/classes/ResourceLoader.xml20
-rw-r--r--doc/classes/ResourcePreloader.xml1
-rw-r--r--doc/classes/ResourceSaver.xml16
-rw-r--r--doc/classes/ResourceSaverPNG.xml13
-rw-r--r--doc/classes/Sprite.xml2
-rw-r--r--doc/classes/String.xml16
-rw-r--r--doc/classes/TextEdit.xml26
-rw-r--r--doc/classes/TranslationLoaderPO.xml13
-rw-r--r--doc/classes/TranslationServer.xml1
-rw-r--r--doc/classes/VisualShaderNodeGroupBase.xml8
60 files changed, 528 insertions, 1772 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
deleted file mode 100644
index b6de5dbf62..0000000000
--- a/doc/classes/@GDScript.xml
+++ /dev/null
@@ -1,1301 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GDScript" category="Core" version="3.2">
- <brief_description>
- Built-in GDScript functions.
- </brief_description>
- <description>
- List of core built-in GDScript functions. Math functions and other utilities. Everything else is provided by objects. (Keywords: builtin, built in, global functions.)
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="Color8">
- <return type="Color">
- </return>
- <argument index="0" name="r8" type="int">
- </argument>
- <argument index="1" name="g8" type="int">
- </argument>
- <argument index="2" name="b8" type="int">
- </argument>
- <argument index="3" name="a8" type="int" default="255">
- </argument>
- <description>
- Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8 bits of information ranging from 0 to 255.
- [code]r8[/code] red channel
- [code]g8[/code] green channel
- [code]b8[/code] blue channel
- [code]a8[/code] alpha channel
- [codeblock]
- red = Color8(255, 0, 0)
- [/codeblock]
- </description>
- </method>
- <method name="ColorN">
- <return type="Color">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="alpha" type="float" default="1.0">
- </argument>
- <description>
- Returns a color according to the standardised [code]name[/code] with [code]alpha[/code] ranging from 0 to 1.
- [codeblock]
- red = ColorN("red", 1)
- [/codeblock]
- Supported color names:
- "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflower", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "webgray", "green", "webgreen", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrod", "lightgray", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "webmaroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navyblue", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "webpurple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen".
- </description>
- </method>
- <method name="abs">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the absolute value of parameter [code]s[/code] (i.e. unsigned value, works for integer and float).
- [codeblock]
- # a is 1
- a = abs(-1)
- [/codeblock]
- </description>
- </method>
- <method name="acos">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the arc cosine of [code]s[/code] in radians. Use to get the angle of cosine [code]s[/code].
- [codeblock]
- # c is 0.523599 or 30 degrees if converted with rad2deg(s)
- c = acos(0.866025)
- [/codeblock]
- </description>
- </method>
- <method name="asin">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the arc sine of [code]s[/code] in radians. Use to get the angle of sine [code]s[/code].
- [codeblock]
- # s is 0.523599 or 30 degrees if converted with rad2deg(s)
- s = asin(0.5)
- [/codeblock]
- </description>
- </method>
- <method name="assert">
- <return type="void">
- </return>
- <argument index="0" name="condition" type="bool">
- </argument>
- <description>
- Asserts that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code], an error is generated and the program is halted until you resume it. Only executes in debug builds, or when running the game from the editor. Use it for debugging purposes, to make sure a statement is [code]true[/code] during development.
- [codeblock]
- # Imagine we always want speed to be between 0 and 20
- speed = -10
- assert(speed &lt; 20) # True, the program will continue
- assert(speed &gt;= 0) # False, the program will stop
- assert(speed &gt;= 0 &amp;&amp; speed &lt; 20) # You can also combine the two conditional statements in one check
- [/codeblock]
- </description>
- </method>
- <method name="atan">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the arc tangent of [code]s[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code].
- The method cannot know in which quadrant the angle should fall. See [method atan2] if you always want an exact angle.
- [codeblock]
- a = atan(0.5) # a is 0.463648
- [/codeblock]
- </description>
- </method>
- <method name="atan2">
- <return type="float">
- </return>
- <argument index="0" name="y" type="float">
- </argument>
- <argument index="1" name="x" type="float">
- </argument>
- <description>
- Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
- [codeblock]
- a = atan2(0, -1) # a is 3.141593
- [/codeblock]
- </description>
- </method>
- <method name="bytes2var">
- <return type="Variant">
- </return>
- <argument index="0" name="bytes" type="PoolByteArray">
- </argument>
- <argument index="1" name="allow_objects" type="bool" default="false">
- </argument>
- <description>
- Decodes a byte array back to a value. When [code]allow_objects[/code] is [code]true[/code] decoding objects is allowed.
- [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
- </description>
- </method>
- <method name="cartesian2polar">
- <return type="Vector2">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle).
- </description>
- </method>
- <method name="ceil">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Rounds [code]s[/code] upward, returning the smallest integral value that is not less than [code]s[/code].
- [codeblock]
- i = ceil(1.45) # i is 2
- i = ceil(1.001) # i is 2
- [/codeblock]
- </description>
- </method>
- <method name="char">
- <return type="String">
- </return>
- <argument index="0" name="ascii" type="int">
- </argument>
- <description>
- Returns a character as a String of the given ASCII code.
- [codeblock]
- # a is 'A'
- a = char(65)
- # a is 'a'
- a = char(65 + 32)
- [/codeblock]
- </description>
- </method>
- <method name="clamp">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="min" type="float">
- </argument>
- <argument index="2" name="max" type="float">
- </argument>
- <description>
- Clamps [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
- [codeblock]
- speed = 1000
- # a is 20
- a = clamp(speed, 1, 20)
-
- speed = -10
- # a is 1
- a = clamp(speed, 1, 20)
- [/codeblock]
- </description>
- </method>
- <method name="convert">
- <return type="Variant">
- </return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <description>
- Converts from a type to another in the best way possible. The [code]type[/code] parameter uses the enum TYPE_* in [@GlobalScope].
- [codeblock]
- a = Vector2(1, 0)
- # prints 1
- print(a.length())
- a = convert(a, TYPE_STRING)
- # prints 6
- # (1, 0) is 6 characters
- print(a.length())
- [/codeblock]
- </description>
- </method>
- <method name="cos">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the cosine of angle [code]s[/code] in radians.
- [codeblock]
- # prints 1 and -1
- print(cos(PI * 2))
- print(cos(PI))
- [/codeblock]
- </description>
- </method>
- <method name="cosh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic cosine of [code]s[/code] in radians.
- [codeblock]
- # prints 1.543081
- print(cosh(1))
- [/codeblock]
- </description>
- </method>
- <method name="db2linear">
- <return type="float">
- </return>
- <argument index="0" name="db" type="float">
- </argument>
- <description>
- Converts from decibels to linear energy (audio).
- </description>
- </method>
- <method name="decimals">
- <return type="int">
- </return>
- <argument index="0" name="step" type="float">
- </argument>
- <description>
- Deprecated alias for "[method step_decimals]".
- </description>
- </method>
- <method name="dectime">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="amount" type="float">
- </argument>
- <argument index="2" name="step" type="float">
- </argument>
- <description>
- Returns the result of [code]value[/code] decreased by [code]step[/code] * [code]amount[/code].
- [codeblock]
- # a = 59
- a = dectime(60, 10, 0.1))
- [/codeblock]
- </description>
- </method>
- <method name="deg2rad">
- <return type="float">
- </return>
- <argument index="0" name="deg" type="float">
- </argument>
- <description>
- Returns degrees converted to radians.
- [codeblock]
- # r is 3.141593
- r = deg2rad(180)
- [/codeblock]
- </description>
- </method>
- <method name="dict2inst">
- <return type="Object">
- </return>
- <argument index="0" name="dict" type="Dictionary">
- </argument>
- <description>
- Converts a previously converted instance to a dictionary, back into an instance. Useful for deserializing.
- </description>
- </method>
- <method name="ease">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <argument index="1" name="curve" type="float">
- </argument>
- <description>
- Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
- </description>
- </method>
- <method name="exp">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]s[/code] and returns it.
- [b]e[/b] has an approximate value of 2.71828.
- [codeblock]
- a = exp(2) # approximately 7.39
- [/codeblock]
- </description>
- </method>
- <method name="floor">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Rounds [code]s[/code] to the closest smaller integer and returns it.
- [codeblock]
- # a is 2
- a = floor(2.99)
- # a is -3
- a = floor(-2.99)
- [/codeblock]
- </description>
- </method>
- <method name="fmod">
- <return type="float">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Returns the floating-point remainder of [code]x/y[/code].
- [codeblock]
- # remainder is 1.5
- var remainder = fmod(7, 5.5)
- [/codeblock]
- </description>
- </method>
- <method name="fposmod">
- <return type="float">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Returns the floating-point remainder of [code]x/y[/code] that wraps equally in positive and negative.
- [codeblock]
- var i = -10
- while i &lt; 0:
- prints(i, fposmod(i, 10))
- i += 1
- [/codeblock]
- Produces:
- [codeblock]
- -10 10
- -9 1
- -8 2
- -7 3
- -6 4
- -5 5
- -4 6
- -3 7
- -2 8
- -1 9
- [/codeblock]
- </description>
- </method>
- <method name="funcref">
- <return type="FuncRef">
- </return>
- <argument index="0" name="instance" type="Object">
- </argument>
- <argument index="1" name="funcname" type="String">
- </argument>
- <description>
- Returns a reference to the specified function [code]funcname[/code] in the [code]instance[/code] node. As functions aren't first-class objects in GDscript, use [code]funcref[/code] to store a [FuncRef] in a variable and call it later.
- [codeblock]
- func foo():
- return("bar")
-
- a = funcref(self, "foo")
- print(a.call_func()) # prints bar
- [/codeblock]
- </description>
- </method>
- <method name="get_stack">
- <return type="Array">
- </return>
- <description>
- Returns an array of dictionaries representing the current call stack.
- [codeblock]
- func _ready():
- foo()
-
- func foo():
- bar()
-
- func bar():
- print(get_stack())
- [/codeblock]
- would print
- [codeblock]
- [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}]
- [/codeblock]
- </description>
- </method>
- <method name="hash">
- <return type="int">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Returns the integer hash of the variable passed.
- [codeblock]
- print(hash("a")) # prints 177670
- [/codeblock]
- </description>
- </method>
- <method name="inst2dict">
- <return type="Dictionary">
- </return>
- <argument index="0" name="inst" type="Object">
- </argument>
- <description>
- Returns the passed instance converted to a dictionary (useful for serializing).
- [codeblock]
- var foo = "bar"
- func _ready():
- var d = inst2dict(self)
- print(d.keys())
- print(d.values())
- [/codeblock]
- Prints out:
- [codeblock]
- [@subpath, @path, foo]
- [, res://test.gd, bar]
- [/codeblock]
- </description>
- </method>
- <method name="instance_from_id">
- <return type="Object">
- </return>
- <argument index="0" name="instance_id" type="int">
- </argument>
- <description>
- Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID.
- [codeblock]
- var foo = "bar"
- func _ready():
- var id = get_instance_id()
- var inst = instance_from_id(id)
- print(inst.foo) # prints bar
- [/codeblock]
- </description>
- </method>
- <method name="inverse_lerp">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="weight" type="float">
- </argument>
- <description>
- Returns a normalized value considering the given range.
- [codeblock]
- inverse_lerp(3, 5, 4) # returns 0.5
- [/codeblock]
- </description>
- </method>
- <method name="is_equal_approx">
- <return type="bool">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Returns True/False whether [code]a[/code] and [code]b[/code] are approximately equal to each other.
- </description>
- </method>
- <method name="is_inf">
- <return type="bool">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns whether [code]s[/code] is an infinity value (either positive infinity or negative infinity).
- </description>
- </method>
- <method name="is_instance_valid">
- <return type="bool">
- </return>
- <argument index="0" name="instance" type="Object">
- </argument>
- <description>
- Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory).
- </description>
- </method>
- <method name="is_nan">
- <return type="bool">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns whether [code]s[/code] is a NaN (Not-A-Number) value.
- </description>
- </method>
- <method name="is_zero_approx">
- <return type="bool">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns True/False whether [code]s[/code] is zero or almost zero.
- </description>
- </method>
- <method name="len">
- <return type="int">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Returns length of Variant [code]var[/code]. Length is the character count of String, element count of Array, size of Dictionary, etc.
- [b]Note:[/b] Generates a fatal error if Variant can not provide a length.
- [codeblock]
- a = [1, 2, 3, 4]
- len(a) # returns 4
- [/codeblock]
- </description>
- </method>
- <method name="lerp">
- <return type="Variant">
- </return>
- <argument index="0" name="from" type="Variant">
- </argument>
- <argument index="1" name="to" type="Variant">
- </argument>
- <argument index="2" name="weight" type="float">
- </argument>
- <description>
- Linearly interpolates between two values by a normalized value.
- If the [code]from[/code] and [code]to[/code] arguments are of type [int] or [float], the return value is a [float].
- If both are of the same vector type ([Vector2], [Vector3] or [Color]), the return value will be of the same type ([code]lerp[/code] then calls the vector type's [code]linear_interpolate[/code] method).
- [codeblock]
- lerp(0, 4, 0.75) # returns 3.0
- lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # returns Vector2(2, 3.5)
- [/codeblock]
- </description>
- </method>
- <method name="linear2db">
- <return type="float">
- </return>
- <argument index="0" name="nrg" type="float">
- </argument>
- <description>
- Converts from linear energy to decibels (audio).
- </description>
- </method>
- <method name="load">
- <return type="Resource">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Loads a resource from the filesystem located at [code]path[/code].
- [b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
- [codeblock]
- # load a scene called main located in the root of the project directory
- var main = load("res://main.tscn")
- [/codeblock]
- </description>
- </method>
- <method name="log">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Natural logarithm. The amount of time needed to reach a certain level of continuous growth.
- [b]Note:[/b] This is not the same as the log function on your calculator which is a base 10 logarithm.
- [codeblock]
- log(10) # returns 2.302585
- [/codeblock]
- </description>
- </method>
- <method name="max">
- <return type="float">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Returns the maximum of two values.
- [codeblock]
- max(1, 2) # returns 2
- max(-3.99, -4) # returns -3.99
- [/codeblock]
- </description>
- </method>
- <method name="min">
- <return type="float">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Returns the minimum of two values.
- [codeblock]
- min(1, 2) # returns 1
- min(-3.99, -4) # returns -4
- [/codeblock]
- </description>
- </method>
- <method name="move_toward">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="delta" type="float">
- </argument>
- <description>
- Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value.
- Use a negative [code]delta[/code] value to move away.
- [codeblock]
- move_toward(10, 5, 4) # returns 6
- [/codeblock]
- </description>
- </method>
- <method name="nearest_po2">
- <return type="int">
- </return>
- <argument index="0" name="value" type="int">
- </argument>
- <description>
- Returns the nearest larger power of 2 for integer [code]value[/code].
- [codeblock]
- nearest_po2(3) # returns 4
- nearest_po2(4) # returns 4
- nearest_po2(5) # returns 8
- [/codeblock]
- </description>
- </method>
- <method name="parse_json">
- <return type="Variant">
- </return>
- <argument index="0" name="json" type="String">
- </argument>
- <description>
- Parse JSON text to a Variant (use [method typeof] to check if it is what you expect).
- Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
- Note that JSON objects do not preserve key order like Godot dictionaries, thus you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:
- [codeblock]
- p = parse_json('["a", "b", "c"]')
- if typeof(p) == TYPE_ARRAY:
- print(p[0]) # prints a
- else:
- print("unexpected results")
- [/codeblock]
- </description>
- </method>
- <method name="polar2cartesian">
- <return type="Vector2">
- </return>
- <argument index="0" name="r" type="float">
- </argument>
- <argument index="1" name="th" type="float">
- </argument>
- <description>
- Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (x and y axis).
- </description>
- </method>
- <method name="pow">
- <return type="float">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Returns the result of [code]x[/code] raised to the power of [code]y[/code].
- [codeblock]
- pow(2, 5) # returns 32
- [/codeblock]
- </description>
- </method>
- <method name="preload">
- <return type="Resource">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Returns a resource from the filesystem that is loaded during script parsing.
- [b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
- [codeblock]
- # load a scene called main located in the root of the project directory
- var main = preload("res://main.tscn")
- [/codeblock]
- </description>
- </method>
- <method name="print" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Converts one or more arguments to strings in the best way possible and prints them to the console.
- [codeblock]
- a = [1, 2, 3]
- print("a", "b", a) # prints ab[1, 2, 3]
- [/codeblock]
- </description>
- </method>
- <method name="print_debug" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Like [method print], but prints only when used in debug mode.
- </description>
- </method>
- <method name="print_stack">
- <return type="void">
- </return>
- <description>
- Prints a stack track at code location, only works when running with debugger turned on.
- Output in the console would look something like this:
- [codeblock]
- Frame 0 - res://test.gd:16 in function '_process'
- [/codeblock]
- </description>
- </method>
- <method name="printerr" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Prints one or more arguments to strings in the best way possible to standard error line.
- [codeblock]
- printerr("prints to stderr")
- [/codeblock]
- </description>
- </method>
- <method name="printraw" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Prints one or more arguments to strings in the best way possible to console. No newline is added at the end.
- [codeblock]
- printraw("A")
- printraw("B")
- # prints AB
- [/codeblock]
- </description>
- </method>
- <method name="prints" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Prints one or more arguments to the console with a space between each argument.
- [codeblock]
- prints("A", "B", "C") # prints A B C
- [/codeblock]
- </description>
- </method>
- <method name="printt" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Prints one or more arguments to the console with a tab between each argument.
- [codeblock]
- printt("A", "B", "C") # prints A B C
- [/codeblock]
- </description>
- </method>
- <method name="push_error">
- <return type="void">
- </return>
- <argument index="0" name="message" type="String">
- </argument>
- <description>
- Pushes an error message to Godot's built-in debugger and to the OS terminal.
- [codeblock]
- push_error("test error") # prints "test error" to debugger and terminal as error call
- [/codeblock]
- </description>
- </method>
- <method name="push_warning">
- <return type="void">
- </return>
- <argument index="0" name="message" type="String">
- </argument>
- <description>
- Pushes a warning message to Godot's built-in debugger and to the OS terminal.
- [codeblock]
- push_warning("test warning") # prints "test warning" to debugger and terminal as warning call
- [/codeblock]
- </description>
- </method>
- <method name="rad2deg">
- <return type="float">
- </return>
- <argument index="0" name="rad" type="float">
- </argument>
- <description>
- Converts from radians to degrees.
- [codeblock]
- rad2deg(0.523599) # returns 30
- [/codeblock]
- </description>
- </method>
- <method name="rand_range">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <description>
- Random range, any floating point value between [code]from[/code] and [code]to[/code].
- [codeblock]
- prints(rand_range(0, 1), rand_range(0, 1)) # prints e.g. 0.135591 0.405263
- [/codeblock]
- </description>
- </method>
- <method name="rand_seed">
- <return type="Array">
- </return>
- <argument index="0" name="seed" type="int">
- </argument>
- <description>
- Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
- </description>
- </method>
- <method name="randf">
- <return type="float">
- </return>
- <description>
- Returns a random floating point value on the interval [code][0, 1][/code].
- [codeblock]
- randf() # returns e.g. 0.375671
- [/codeblock]
- </description>
- </method>
- <method name="randi">
- <return type="int">
- </return>
- <description>
- Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval [code][0, N][/code] (where N is smaller than 2^32 -1).
- [codeblock]
- randi() # returns random integer between 0 and 2^32 - 1
- randi() % 20 # returns random integer between 0 and 19
- randi() % 100 # returns random integer between 0 and 99
- randi() % 100 + 1 # returns random integer between 1 and 100
- [/codeblock]
- </description>
- </method>
- <method name="randomize">
- <return type="void">
- </return>
- <description>
- Randomizes the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
- [codeblock]
- func _ready():
- randomize()
- [/codeblock]
- </description>
- </method>
- <method name="range" qualifiers="vararg">
- <return type="Array">
- </return>
- <description>
- Returns an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment).
- [codeblock]
- for i in range(4):
- print(i)
- for i in range(2, 5):
- print(i)
- for i in range(0, 6, 2):
- print(i)
- [/codeblock]
- Output:
- [codeblock]
- 0
- 1
- 2
- 3
-
- 2
- 3
- 4
-
- 0
- 2
- 4
- [/codeblock]
- </description>
- </method>
- <method name="range_lerp">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="istart" type="float">
- </argument>
- <argument index="2" name="istop" type="float">
- </argument>
- <argument index="3" name="ostart" type="float">
- </argument>
- <argument index="4" name="ostop" type="float">
- </argument>
- <description>
- Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code].
- [codeblock]
- range_lerp(75, 0, 100, -1, 1) # returns 0.5
- [/codeblock]
- </description>
- </method>
- <method name="round">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the integral value that is nearest to [code]s[/code], with halfway cases rounded away from zero.
- [codeblock]
- round(2.6) # returns 3
- [/codeblock]
- </description>
- </method>
- <method name="seed">
- <return type="void">
- </return>
- <argument index="0" name="seed" type="int">
- </argument>
- <description>
- Sets seed for the random number generator.
- [codeblock]
- my_seed = "Godot Rocks"
- seed(my_seed.hash())
- [/codeblock]
- </description>
- </method>
- <method name="sign">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the sign of [code]s[/code]: -1 or 1. Returns 0 if [code]s[/code] is 0.
- [codeblock]
- sign(-6) # returns -1
- sign(0) # returns 0
- sign(6) # returns 1
- [/codeblock]
- </description>
- </method>
- <method name="sin">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the sine of angle [code]s[/code] in radians.
- [codeblock]
- sin(0.523599) # returns 0.5
- [/codeblock]
- </description>
- </method>
- <method name="sinh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic sine of [code]s[/code].
- [codeblock]
- a = log(2.0) # returns 0.693147
- sinh(a) # returns 0.75
- [/codeblock]
- </description>
- </method>
- <method name="smoothstep">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="weight" type="float">
- </argument>
- <description>
- Returns a number smoothly interpolated between the [code]from[/code] and [code]to[/code], based on the [code]weight[/code]. Similar to [method lerp], but interpolates faster at the beginning and slower at the end.
- [codeblock]
- smoothstep(0, 2, 0.5) # returns 0.15
- smoothstep(0, 2, 1.0) # returns 0.5
- smoothstep(0, 2, 2.0) # returns 1.0
- [/codeblock]
- </description>
- </method>
- <method name="sqrt">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the square root of [code]s[/code].
- [codeblock]
- sqrt(9) # returns 3
- [/codeblock]
- </description>
- </method>
- <method name="step_decimals">
- <return type="int">
- </return>
- <argument index="0" name="step" type="float">
- </argument>
- <description>
- Returns the position of the first non-zero digit, after the decimal point.
- [codeblock]
- # n is 0
- n = step_decimals(5)
- # n is 4
- n = step_decimals(1.0005)
- # n is 9
- n = step_decimals(0.000000005)
- [/codeblock]
- </description>
- </method>
- <method name="stepify">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <argument index="1" name="step" type="float">
- </argument>
- <description>
- Snaps float value [code]s[/code] to a given [code]step[/code].
- </description>
- </method>
- <method name="str" qualifiers="vararg">
- <return type="String">
- </return>
- <description>
- Converts one or more arguments to string in the best way possible.
- [codeblock]
- var a = [10, 20, 30]
- var b = str(a);
- len(a) # returns 3
- len(b) # returns 12
- [/codeblock]
- </description>
- </method>
- <method name="str2var">
- <return type="Variant">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Converts a formatted string that was returned by [method var2str] to the original value.
- [codeblock]
- a = '{ "a": 1, "b": 2 }'
- b = str2var(a)
- print(b['a']) # prints 1
- [/codeblock]
- </description>
- </method>
- <method name="tan">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the tangent of angle [code]s[/code] in radians.
- [codeblock]
- tan(deg2rad(45)) # returns 1
- [/codeblock]
- </description>
- </method>
- <method name="tanh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic tangent of [code]s[/code].
- [codeblock]
- a = log(2.0) # returns 0.693147
- tanh(a) # returns 0.6
- [/codeblock]
- </description>
- </method>
- <method name="to_json">
- <return type="String">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Converts a Variant [code]var[/code] to JSON text and return the result. Useful for serializing data to store or send over the network.
- [codeblock]
- a = { 'a': 1, 'b': 2 }
- b = to_json(a)
- print(b) # {"a":1, "b":2}
- [/codeblock]
- </description>
- </method>
- <method name="type_exists">
- <return type="bool">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- Returns whether the given class exists in [ClassDB].
- [codeblock]
- type_exists("Sprite") # returns true
- type_exists("Variant") # returns false
- [/codeblock]
- </description>
- </method>
- <method name="typeof">
- <return type="int">
- </return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <description>
- Returns the internal type of the given Variant object, using the TYPE_* enum in [@GlobalScope].
- [codeblock]
- p = parse_json('["a", "b", "c"]')
- if typeof(p) == TYPE_ARRAY:
- print(p[0]) # prints a
- else:
- print("unexpected results")
- [/codeblock]
- </description>
- </method>
- <method name="validate_json">
- <return type="String">
- </return>
- <argument index="0" name="json" type="String">
- </argument>
- <description>
- Checks that [code]json[/code] is valid JSON data. Returns empty string if valid. Returns error message if not valid.
- [codeblock]
- j = to_json([1, 2, 3])
- v = validate_json(j)
- if not v:
- print("valid")
- else:
- prints("invalid", v)
- [/codeblock]
- </description>
- </method>
- <method name="var2bytes">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <argument index="1" name="full_objects" type="bool" default="false">
- </argument>
- <description>
- Encodes a variable value to a byte array. When [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code).
- </description>
- </method>
- <method name="var2str">
- <return type="String">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Converts a Variant [code]var[/code] to a formatted string that can later be parsed using [method str2var].
- [codeblock]
- a = { 'a': 1, 'b': 2 }
- print(var2str(a))
- [/codeblock]
- prints
- [codeblock]
- {
- "a": 1,
- "b": 2
- }
- [/codeblock]
- </description>
- </method>
- <method name="weakref">
- <return type="WeakRef">
- </return>
- <argument index="0" name="obj" type="Object">
- </argument>
- <description>
- Returns a weak reference to an object.
- A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
- </description>
- </method>
- <method name="wrapf">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="min" type="float">
- </argument>
- <argument index="2" name="max" type="float">
- </argument>
- <description>
- Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code].
- Usable for creating loop-alike behavior or infinite surfaces.
- [codeblock]
- # a is 0.5
- a = wrapf(10.5, 0.0, 10.0)
- [/codeblock]
- [codeblock]
- # a is 9.5
- a = wrapf(-0.5, 0.0, 10.0)
- [/codeblock]
- [codeblock]
- # infinite loop between 0.0 and 0.99
- f = wrapf(f + 0.1, 0.0, 1.0)
- [/codeblock]
- </description>
- </method>
- <method name="wrapi">
- <return type="int">
- </return>
- <argument index="0" name="value" type="int">
- </argument>
- <argument index="1" name="min" type="int">
- </argument>
- <argument index="2" name="max" type="int">
- </argument>
- <description>
- Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code].
- Usable for creating loop-alike behavior or infinite surfaces.
- [codeblock]
- # a is 0
- a = wrapi(10, 0, 10)
- [/codeblock]
- [codeblock]
- # a is 9
- a = wrapi(-1, 0, 10)
- [/codeblock]
- [codeblock]
- # infinite loop between 0 and 9
- frame = wrapi(frame + 1, 0, 10)
- [/codeblock]
- </description>
- </method>
- <method name="yield">
- <return type="GDScriptFunctionState">
- </return>
- <argument index="0" name="object" type="Object" default="null">
- </argument>
- <argument index="1" name="signal" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Stops the function execution and returns the current suspended state to the calling function.
- From the caller, call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state. Within the resumed function, [code]yield()[/code] returns whatever was passed to the [code]resume()[/code] function call.
- If passed an object and a signal, the execution is resumed when the object emits the given signal. In this case, [code]yield()[/code] returns the argument passed to [code]emit_signal()[/code] if the signal takes only one argument, or an array containing all the arguments passed to [code]emit_signal()[/code] if the signal takes multiple arguments.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PI" value="3.141593">
- Constant that represents how many times the diameter of a circle fits around its perimeter.
- </constant>
- <constant name="TAU" value="6.283185">
- The circle constant, the circumference of the unit circle.
- </constant>
- <constant name="INF" value="inf">
- A positive infinity. (For negative infinity, use -INF).
- </constant>
- <constant name="NAN" value="nan">
- Macro constant that expands to an expression of type float that represents a NaN.
- The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/@NativeScript.xml b/doc/classes/@NativeScript.xml
deleted file mode 100644
index cb5de198ac..0000000000
--- a/doc/classes/@NativeScript.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@NativeScript" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml
deleted file mode 100644
index 8d9408e6d4..0000000000
--- a/doc/classes/@VisualScript.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@VisualScript" category="Core" version="3.2">
- <brief_description>
- Built-in visual script functions.
- </brief_description>
- <description>
- A list of built-in visual script functions, see [VisualScriptBuiltinFunc] and [VisualScript].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 16ceb293ad..81722535c2 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar" inherits="Reference" category="Core" version="3.2">
<brief_description>
- AStar class representation that uses vectors as edges.
+ AStar class representation that uses 3d-vectors as edges.
</brief_description>
<description>
A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points. It enjoys widespread use due to its performance and accuracy. Godot's A* implementation make use of vectors as points.
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
new file mode 100644
index 0000000000..b86e53d4d4
--- /dev/null
+++ b/doc/classes/AStar2D.xml
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AStar2D" inherits="Reference" category="Core" version="3.2">
+ <brief_description>
+ AStar class representation that uses 2d-vectors as edges.
+ </brief_description>
+ <description>
+ This is a wrapper for the [AStar] class which uses 2D vectors instead of 3D vectors.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="position" type="Vector2">
+ </argument>
+ <argument index="2" name="weight_scale" type="float" default="1.0">
+ </argument>
+ <description>
+ Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1
+ [/codeblock]
+ If there already exists a point for the given id, its position and weight scale are updated to the given values.
+ </description>
+ </method>
+ <method name="are_points_connected" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns whether there is a connection/segment between the given points.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clears all the points and segments.
+ </description>
+ </method>
+ <method name="connect_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <argument index="2" name="bidirectional" type="bool" default="true">
+ </argument>
+ <description>
+ Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(1, 1))
+ as.add_point(2, Vector2(0, 5))
+ as.connect_points(1, 2, false)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="disconnect_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Deletes the segment between the given points.
+ </description>
+ </method>
+ <method name="get_available_point_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the next available point id with no point associated to it.
+ </description>
+ </method>
+ <method name="get_closest_point" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="to_position" type="Vector2">
+ </argument>
+ <description>
+ Returns the id of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool.
+ </description>
+ </method>
+ <method name="get_closest_position_in_segment" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="to_position" type="Vector2">
+ </argument>
+ <description>
+ Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(0, 0))
+ as.add_point(2, Vector2(0, 5))
+ as.connect_points(1, 2)
+ var res = as.get_closest_position_in_segment(Vector2(3, 3)) # returns (0, 3)
+ [/codeblock]
+ The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point.
+ </description>
+ </method>
+ <method name="get_id_path">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns an array with the ids of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(0, 0))
+ as.add_point(2, Vector2(0, 1), 1) # default weight is 1
+ as.add_point(3, Vector2(1, 1))
+ as.add_point(4, Vector2(2, 0))
+
+ as.connect_points(1, 2, false)
+ as.connect_points(2, 3, false)
+ as.connect_points(4, 3, false)
+ as.connect_points(1, 4, false)
+ as.connect_points(5, 4, false)
+
+ var res = as.get_id_path(1, 3) # returns [1, 2, 3]
+ [/codeblock]
+ If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
+ </description>
+ </method>
+ <method name="get_point_connections">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns an array with the ids of the points that form the connect with the given point.
+ [codeblock]
+ var as = AStar2D.new()
+ as.add_point(1, Vector2(0, 0))
+ as.add_point(2, Vector2(0, 1))
+ as.add_point(3, Vector2(1, 1))
+ as.add_point(4, Vector2(2, 0))
+
+ as.connect_points(1, 2, true)
+ as.connect_points(1, 3, true)
+
+ var neighbors = as.get_point_connections(1) # returns [2, 3]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_point_path">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
+ </description>
+ </method>
+ <method name="get_point_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns the position of the point associated with the given id.
+ </description>
+ </method>
+ <method name="get_point_weight_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns the weight scale of the point associated with the given id.
+ </description>
+ </method>
+ <method name="get_points">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array of all points.
+ </description>
+ </method>
+ <method name="has_point" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns whether a point associated with the given id exists.
+ </description>
+ </method>
+ <method name="is_point_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
+ </description>
+ </method>
+ <method name="remove_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Removes the point associated with the given id from the points pool.
+ </description>
+ </method>
+ <method name="set_point_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool" default="true">
+ </argument>
+ <description>
+ Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
+ </description>
+ </method>
+ <method name="set_point_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="position" type="Vector2">
+ </argument>
+ <description>
+ Sets the position for the point with the given id.
+ </description>
+ </method>
+ <method name="set_point_weight_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="weight_scale" type="float">
+ </argument>
+ <description>
+ Sets the [code]weight_scale[/code] for the point with the given id.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index db35b2f352..3ea280cba3 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -57,12 +57,15 @@
</method>
</methods>
<members>
+ <member name="dialog_autowrap" type="bool" setter="set_autowrap" getter="has_autowrap">
+ Sets autowrapping for the text in the dialog.
+ </member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok">
If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. Default value: [code]true[/code].
Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [FileDialog] defaults to [code]false[/code], and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such this property can't be used in [FileDialog] to disable hiding the dialog when pressing OK.
</member>
<member name="dialog_text" type="String" setter="set_text" getter="get_text">
- The text displayed by this dialog.
+ The text displayed by the dialog.
</member>
</members>
<signals>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 5ea993f83d..ff91db2e28 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -238,6 +238,9 @@
<member name="current_animation_position" type="float" setter="" getter="get_current_animation_position">
The position (in seconds) of the currently playing animation.
</member>
+ <member name="method_call_mode" type="int" setter="set_method_call_mode" getter="get_method_call_mode" enum="AnimationPlayer.AnimationMethodCallMode">
+ The call mode to use for Call Method tracks. Default value: [code]ANIMATION_METHOD_CALL_DEFERRED[/code].
+ </member>
<member name="playback_active" type="bool" setter="set_active" getter="is_active">
If [code]true[/code], updates animations in response to process-related notifications. Default value: [code]true[/code].
</member>
@@ -293,5 +296,11 @@
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
Do not process animation. Use the 'advance' method to process the animation manually.
</constant>
+ <constant name="ANIMATION_METHOD_CALL_DEFERRED" value="0" enum="AnimationMethodCallMode">
+ Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing.
+ </constant>
+ <constant name="ANIMATION_METHOD_CALL_IMMEDIATE" value="1" enum="AnimationMethodCallMode">
+ Make method calls immediately when reached in the animation.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index c39c570be9..d40376414f 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -56,7 +56,8 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
- If [code]true[/code], the given body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
+ If [code]true[/code], the given physics body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
+ The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</method>
<method name="set_collision_layer_bit">
@@ -183,14 +184,16 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
- Emitted when a [PhysicsBody] object enters.
+ Emitted when a physics body enters.
+ The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Node">
</argument>
<description>
- Emitted when a [PhysicsBody] object exits.
+ Emitted when a physics body exits.
+ The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</signal>
<signal name="body_shape_entered">
@@ -203,7 +206,8 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- Emitted when a [PhysicsBody] object enters, reporting which shapes overlapped.
+ Emitted when a physics body enters, reporting which shapes overlapped.
+ The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</signal>
<signal name="body_shape_exited">
@@ -216,7 +220,8 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- Emitted when a [PhysicsBody] object exits, reporting which shapes were overlapping.
+ Emitted when a physics body exits, reporting which shapes were overlapping.
+ The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</signal>
</signals>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 8d28ddc889..4771a976b5 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -56,7 +56,8 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
- If [code]true[/code], the given body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
+ If [code]true[/code], the given physics body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
+ The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</method>
<method name="set_collision_layer_bit">
@@ -168,43 +169,47 @@
</description>
</signal>
<signal name="body_entered">
- <argument index="0" name="body" type="PhysicsBody2D">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
- Emitted when a [PhysicsBody2D] object enters.
+ Emitted when a physics body enters.
+ The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</signal>
<signal name="body_exited">
- <argument index="0" name="body" type="PhysicsBody2D">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
- Emitted when a [PhysicsBody2D] object exits.
+ Emitted when a physics body exits.
+ The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</signal>
<signal name="body_shape_entered">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="PhysicsBody2D">
+ <argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- Emitted when a [PhysicsBody2D] object enters, reporting which shapes overlapped.
+ Emitted when a physics body enters, reporting which shapes overlapped.
+ The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="PhysicsBody2D">
+ <argument index="1" name="body" type="Node">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- Emitted when a [PhysicsBody2D] object exits, reporting which shapes were overlapping.
+ Emitted when a physics body exits, reporting which shapes were overlapping.
+ The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</signal>
</signals>
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
index 7d6c5f2b20..8c22afb40f 100644
--- a/doc/classes/AudioEffectPitchShift.xml
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -12,10 +12,26 @@
<methods>
</methods>
<members>
+ <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFT_Size">
+ </member>
+ <member name="oversampling" type="int" setter="set_oversampling" getter="get_oversampling">
+ </member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale">
Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves).
</member>
</members>
<constants>
+ <constant name="FFT_SIZE_256" value="0" enum="FFT_Size">
+ </constant>
+ <constant name="FFT_SIZE_512" value="1" enum="FFT_Size">
+ </constant>
+ <constant name="FFT_SIZE_1024" value="2" enum="FFT_Size">
+ </constant>
+ <constant name="FFT_SIZE_2048" value="3" enum="FFT_Size">
+ </constant>
+ <constant name="FFT_SIZE_4096" value="4" enum="FFT_Size">
+ </constant>
+ <constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index e6df2d2f27..7283d5084c 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -99,7 +99,7 @@
Particles will be emitted inside this region. Use [enum EmissionShape] for values. Default value: [constant EMISSION_SHAPE_POINT].
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
- The circle's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_CIRCLE].
+ The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE].
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting">
If [code]true[/code], particles are being emitted. Default value: [code]true[/code].
@@ -271,7 +271,7 @@
All particles will be emitted from a single point.
</constant>
<constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape">
- Particles will be emitted on the surface of a sphere flattened to two dimensions.
+ Particles will be emitted on the surface of a sphere flattened to two dimensions.
</constant>
<constant name="EMISSION_SHAPE_RECTANGLE" value="2" enum="EmissionShape">
Particles will be emitted in the area of a rectangle.
diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml
index 7f353f7a05..4611b9c507 100644
--- a/doc/classes/CameraFeed.xml
+++ b/doc/classes/CameraFeed.xml
@@ -45,10 +45,10 @@
<constant name="FEED_RGB" value="1" enum="FeedDataType">
Feed supplies RGB images.
</constant>
- <constant name="FEED_YCbCr" value="2" enum="FeedDataType">
+ <constant name="FEED_YCBCR" value="2" enum="FeedDataType">
Feed supplies YCbCr images that need to be converted to RGB.
</constant>
- <constant name="FEED_YCbCr_Sep" value="3" enum="FeedDataType">
+ <constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType">
Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
</constant>
<constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition">
diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml
index f492bda74f..ee41f08ec6 100644
--- a/doc/classes/CameraServer.xml
+++ b/doc/classes/CameraServer.xml
@@ -70,13 +70,13 @@
<constant name="FEED_RGBA_IMAGE" value="0" enum="FeedImage">
The RGBA camera image.
</constant>
- <constant name="FEED_YCbCr_IMAGE" value="0" enum="FeedImage">
+ <constant name="FEED_YCBCR_IMAGE" value="0" enum="FeedImage">
The YCbCr camera image.
</constant>
<constant name="FEED_Y_IMAGE" value="0" enum="FeedImage">
The Y component camera image.
</constant>
- <constant name="FEED_CbCr_IMAGE" value="1" enum="FeedImage">
+ <constant name="FEED_CBCR_IMAGE" value="1" enum="FeedImage">
The CbCr component camera image.
</constant>
</constants>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 32e6014c75..0ab91e9621 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -45,12 +45,17 @@
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha">
If [code]true[/code], shows an alpha channel slider (transparency).
</member>
+ <member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode">
+ If [code]true[/code], allows to edit color with Hue/Saturation/Value sliders.
+ [b]Note:[/b] Cannot be enabled if raw mode is on.
+ </member>
<member name="presets_enabled" type="bool" setter="set_presets_enabled" getter="are_presets_enabled">
</member>
<member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible">
</member>
<member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode">
If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
+ [b]Note:[/b] Cannot be enabled if hsv mode is on.
</member>
</members>
<signals>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index ac46d34198..d446363a83 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -85,14 +85,16 @@
</return>
<description>
Returns the current engine version information in a Dictionary.
- "major" - Holds the major version number as an int
- "minor" - Holds the minor version number as an int
- "patch" - Holds the patch version number as an int
- "hex" - Holds the full version number encoded as an hexadecimal int with one byte (2 places) per number (see example below)
- "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
- "build" - Holds the build name (e.g. "custom-build") as a String
- "string" - major + minor + patch + status + build in a single String
- The "hex" value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. Note that it's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code:
+ [code]major[/code] - Holds the major version number as an int
+ [code]minor[/code] - Holds the minor version number as an int
+ [code]patch[/code] - Holds the patch version number as an int
+ [code]hex[/code] - Holds the full version number encoded as an hexadecimal int with one byte (2 places) per number (see example below)
+ [code]status[/code] - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
+ [code]build[/code] - Holds the build name (e.g. "custom_build") as a String
+ [code]hash[/code] - Holds the full Git commit hash as a String
+ [code]year[/code] - Holds the year the version was released in as an int
+ [code]string[/code] - [code]major[/code] + [code]minor[/code] + [code]patch[/code] + [code]status[/code] + [code]build[/code] in a single String
+ The [code]hex[/code] value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. Note that it's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code:
[codeblock]
if Engine.get_version_info().hex &gt;= 0x030200:
# do things specific to version 3.2 or later
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 30da143f88..32fa628bbf 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -115,7 +115,7 @@
<return type="int" enum="Error">
</return>
<description>
- Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@GlobalScope].
+ Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [enum @GlobalScope.Error].
</description>
</method>
<method name="get_float" qualifiers="const">
@@ -241,7 +241,7 @@
<argument index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0">
</argument>
<description>
- Opens a compressed file for reading or writing. Use COMPRESSION_* constants to set [code]compression_mode[/code].
+ Opens a compressed file for reading or writing. Use [enum CompressionMode] constants to set [code]compression_mode[/code].
</description>
</method>
<method name="open_encrypted">
diff --git a/doc/classes/GDNativeLibraryResourceLoader.xml b/doc/classes/GDNativeLibraryResourceLoader.xml
deleted file mode 100644
index 1b98fa3889..0000000000
--- a/doc/classes/GDNativeLibraryResourceLoader.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNativeLibraryResourceLoader" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/GDNativeLibraryResourceSaver.xml b/doc/classes/GDNativeLibraryResourceSaver.xml
deleted file mode 100644
index 346d0d87d4..0000000000
--- a/doc/classes/GDNativeLibraryResourceSaver.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNativeLibraryResourceSaver" inherits="ResourceFormatSaver" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
index 3616a9ec50..65b1700333 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -34,6 +34,22 @@
Returns all of the user's current IPv4 and IPv6 addresses as an array.
</description>
</method>
+ <method name="get_local_interfaces" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns all network adapters as an array.
+ Each adapter is a dictionary of the form:
+ [codeblock]
+ {
+ "index": "1", # Interface index.
+ "name": "eth0", # Interface name.
+ "friendly": "Ethernet One", # A friendly name (might be empty).
+ "addresses": ["192.168.1.101"], # An array of IP addresses associated to this interface.
+ }
+ [/codeblock]
+ </description>
+ </method>
<method name="get_resolve_item_address" qualifiers="const">
<return type="String">
</return>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index ba3a7fe6d8..d78c930351 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -46,7 +46,7 @@
<return type="void">
</return>
<description>
- Ensure selection is visible, adjusting the scroll position as necessary.
+ Ensure current selection is visible, adjusting the scroll position as necessary.
</description>
</method>
<method name="get_item_at_position" qualifiers="const">
@@ -64,7 +64,7 @@
<return type="int">
</return>
<description>
- Returns count of items currently in the item list.
+ Returns the number of items currently in the list.
</description>
</method>
<method name="get_item_custom_bg_color" qualifiers="const">
@@ -73,6 +73,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the custom background color of the item specified by [code]idx[/code] index. Default value is [code]Color(0, 0, 0, 0)[/code].
</description>
</method>
<method name="get_item_custom_fg_color" qualifiers="const">
@@ -81,6 +82,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the custom foreground color of the item specified by [code]idx[/code] index. Default value is [code]Color(0, 0, 0, 0)[/code].
</description>
</method>
<method name="get_item_icon" qualifiers="const">
@@ -89,6 +91,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the icon associated with the specified index. Default value is [code]null[/code]
</description>
</method>
<method name="get_item_icon_modulate" qualifiers="const">
@@ -114,6 +117,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the metadata value of the specified index.
</description>
</method>
<method name="get_item_text" qualifiers="const">
@@ -122,7 +126,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the text for specified item index.
+ Returns the text associated with the specified index.
</description>
</method>
<method name="get_item_tooltip" qualifiers="const">
@@ -131,21 +135,21 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns tooltip hint for specified item index.
+ Returns the tooltip hint associated with the specified index.
</description>
</method>
<method name="get_selected_items">
<return type="PoolIntArray">
</return>
<description>
- Returns the list of selected indexes.
+ Returns an array with the indexes of the selected items.
</description>
</method>
<method name="get_v_scroll">
<return type="VScrollBar">
</return>
<description>
- Returns the current vertical scroll bar for the List.
+ Returns the [Object] ID associated with the list.
</description>
</method>
<method name="is_anything_selected">
@@ -161,7 +165,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns whether or not the item at the specified index is disabled
+ Returns whether or not the item at the specified index is disabled.
</description>
</method>
<method name="is_item_icon_transposed" qualifiers="const">
@@ -207,7 +211,7 @@
<argument index="1" name="to_idx" type="int">
</argument>
<description>
- Moves item at index [code]from_idx[/code] to [code]to_idx[/code].
+ Moves item from index [code]from_idx[/code] to [code]to_idx[/code].
</description>
</method>
<method name="remove_item">
@@ -216,7 +220,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove item at specified index from the list.
+ Removes the item specified by [code]idx[/code] index from the list.
</description>
</method>
<method name="select">
@@ -239,6 +243,11 @@
<argument index="1" name="custom_bg_color" type="Color">
</argument>
<description>
+ Sets the background color of the item specified by [code]idx[/code] index to the specified [Color].
+ [codeblock]
+ var some_string = "Some text"
+ some_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red.
+ [/codeblock]
</description>
</method>
<method name="set_item_custom_fg_color">
@@ -249,6 +258,11 @@
<argument index="1" name="custom_fg_color" type="Color">
</argument>
<description>
+ Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color].
+ [codeblock]
+ var some_string = "Some text"
+ some_string.set_item_custom_fg_color(0,Color(1, 0, 0, 1) # This will set the foreground color of the first item of the control to red.
+ [/codeblock]
</description>
</method>
<method name="set_item_disabled">
@@ -259,8 +273,8 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
- Disable (or enable) item at specified index.
- Disabled items are not be selectable and do not fire activation (Enter or double-click) signals.
+ Disable (or enable) item at the specified index.
+ Disabled items are not be selectable and do not trigger activation (Enter or double-click) signals.
</description>
</method>
<method name="set_item_icon">
@@ -271,7 +285,7 @@
<argument index="1" name="icon" type="Texture">
</argument>
<description>
- Set (or replace) icon of the item at the specified index.
+ Set (or replace) the icon's [Texture] associated with the specified index.
</description>
</method>
<method name="set_item_icon_modulate">
@@ -282,7 +296,7 @@
<argument index="1" name="modulate" type="Color">
</argument>
<description>
- Sets a modulating [Color] for item's icon at the specified index.
+ Sets a modulating [Color] of the item associated with the specified index.
</description>
</method>
<method name="set_item_icon_region">
@@ -313,7 +327,7 @@
<argument index="1" name="metadata" type="Variant">
</argument>
<description>
- Sets a value (of any type) to be stored with the item at the specified index.
+ Sets a value (of any type) to be stored with the item associated with the specified index.
</description>
</method>
<method name="set_item_selectable">
@@ -324,7 +338,7 @@
<argument index="1" name="selectable" type="bool">
</argument>
<description>
- Allow or disallow selection of the item at the specified index.
+ Allow or disallow selection of the item associated with the specified index.
</description>
</method>
<method name="set_item_text">
@@ -335,7 +349,7 @@
<argument index="1" name="text" type="String">
</argument>
<description>
- Sets text of item at specified index.
+ Sets text of the item associated with the specified index.
</description>
</method>
<method name="set_item_tooltip">
@@ -346,7 +360,7 @@
<argument index="1" name="tooltip" type="String">
</argument>
<description>
- Sets tooltip hint for item at specified index.
+ Sets tooltip hint for the item associated with the specified index.
</description>
</method>
<method name="set_item_tooltip_enabled">
@@ -357,7 +371,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Sets whether the tooltip is enabled for specified item index.
+ Sets whether the tooltip hint is enabled for specified item index.
</description>
</method>
<method name="sort_items_by_text">
@@ -373,7 +387,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Ensure item at specified index is not selected.
+ Ensure the item associated with the specified index is not selected.
</description>
</method>
<method name="unselect_all">
@@ -386,29 +400,38 @@
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect">
- If [code]true[/code], the currently selected item may be selected again.
+ If [code]true[/code], the currently selected item can be selected again.
</member>
<member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select">
- If [code]true[/code], a right mouse button click can select items.
+ If [code]true[/code], right mouse button click can select items.
</member>
<member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height">
+ If [code]true[/code], the control will automatically resize the height to fit its content.
</member>
<member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width">
+ Sets the default column width in pixels.
+ If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width.
</member>
<member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size">
+ Sets the default icon size in pixels.
</member>
<member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode">
+ Sets the default position of the icon to either [constant ICON_MODE_LEFT] or [constant ICON_MODE_TOP].
</member>
<member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale">
+ Sets the icon size to its initial size multiplied by the specified scale. Default value is 1.0.
</member>
<member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns">
+ Sets the maximum columns the list will have.
+ If set to anything other than the default, the content will be split among the specified columns.
</member>
<member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines">
</member>
<member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width">
+ If set to [code]true[/code], all columns will have the same width specified by [member fixed_column_width].
</member>
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode">
- Allow single or multiple selection. See the [code]SELECT_*[/code] constants.
+ Allow single or multiple item selection. See the [enum SelectMode] constants.
</member>
</members>
<signals>
@@ -416,7 +439,7 @@
<argument index="0" name="index" type="int">
</argument>
<description>
- Fired when specified list item is activated via double click or Enter.
+ Triggered when specified list item is activated via double click or Enter.
</description>
</signal>
<signal name="item_rmb_selected">
@@ -425,7 +448,7 @@
<argument index="1" name="at_position" type="Vector2">
</argument>
<description>
- Fired when specified list item has been selected via right mouse clicking.
+ Triggered when specified list item has been selected via right mouse clicking.
The click position is also provided to allow appropriate popup of context menus
at the correct location.
[member allow_rmb_select] must be enabled.
@@ -435,7 +458,7 @@
<argument index="0" name="index" type="int">
</argument>
<description>
- Fired when specified item has been selected.
+ Triggered when specified item has been selected.
[member allow_reselect] must be enabled to reselect an item.
</description>
</signal>
@@ -445,17 +468,20 @@
<argument index="1" name="selected" type="bool">
</argument>
<description>
- Fired when a multiple selection is altered on a list allowing multiple selection.
+ Triggered when a multiple selection is altered on a list allowing multiple selection.
</description>
</signal>
<signal name="nothing_selected">
<description>
+ Triggered when a left mouse click is issued within the rect of the list but on empty space.
</description>
</signal>
<signal name="rmb_clicked">
<argument index="0" name="at_position" type="Vector2">
</argument>
<description>
+ Triggered when a right mouse click is issued within the rect of the list but on empty space.
+ [member allow_rmb_select] must be enabled.
</description>
</signal>
</signals>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 2c680e828e..7b50021284 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -811,12 +811,12 @@
<member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode">
If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile.
</member>
- <member name="min_window_size" type="Vector2" setter="set_min_window_size" getter="get_min_window_size">
- The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value.
- </member>
<member name="max_window_size" type="Vector2" setter="set_max_window_size" getter="get_max_window_size">
The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value.
</member>
+ <member name="min_window_size" type="Vector2" setter="set_min_window_size" getter="get_min_window_size">
+ The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value.
+ </member>
<member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation">
The current screen orientation.
</member>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index c9910360ed..548a0c18bb 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -374,6 +374,7 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
+ Set property into the object, 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].
</description>
</method>
<method name="set_indexed">
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index 9843c16108..376818fb86 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -37,6 +37,29 @@
Returns whether this [PacketPeerUDP] is listening.
</description>
</method>
+ <method name="join_multicast_group">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="multicast_address" type="String">
+ </argument>
+ <argument index="1" name="interface_name" type="String">
+ </argument>
+ <description>
+ Join the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code].
+ You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available.
+ </description>
+ </method>
+ <method name="leave_multicast_group">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="multicast_address" type="String">
+ </argument>
+ <argument index="1" name="interface_name" type="String">
+ </argument>
+ <description>
+ Remove the interface identified by [code]interface_name[/code] from the multicast group specified by [code]multicast_address[/code].
+ </description>
+ </method>
<method name="listen">
<return type="int" enum="Error">
</return>
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
index 0e19e35e58..f6025fe2f9 100644
--- a/doc/classes/ReferenceRect.xml
+++ b/doc/classes/ReferenceRect.xml
@@ -4,7 +4,7 @@
Reference frame for GUI.
</brief_description>
<description>
- Reference frame for GUI. It's just like an empty control, except a red box is displayed while editing around its size at all times.
+ Reference frame for GUI. It's just like an empty control, except an outline border [member border_color] is displayed while editing around its size at all times.
</description>
<tutorials>
</tutorials>
@@ -12,6 +12,7 @@
</methods>
<members>
<member name="border_color" type="Color" setter="set_border_color" getter="get_border_color">
+ Determines the border [Color] of the [ReferenceRect].
</member>
</members>
<constants>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 211bda1a09..acd608de6a 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -4,7 +4,7 @@
Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all Godot-specific resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/resources.html</link>
@@ -14,6 +14,7 @@
<return type="void">
</return>
<description>
+ Virtual function which can be overridden to customize the behavior value of [method setup_local_to_scene].
</description>
</method>
<method name="duplicate" qualifiers="const">
@@ -29,6 +30,7 @@
<return type="Node">
</return>
<description>
+ If [member resource_local_to_scene] is enabled and the resource was loaded from a [PackedScene] instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns [code]null[/code].
</description>
</method>
<method name="get_rid" qualifiers="const">
@@ -42,6 +44,8 @@
<return type="void">
</return>
<description>
+ This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by overriding [method _setup_local_to_scene] from script.
+ For most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport.
</description>
</method>
<method name="take_over_path">
@@ -50,12 +54,13 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Sets the path of the resource. Differs from [code]set_path()[/code], if another [Resource] exists with "path" it over-takes it, instead of failing.
+ Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting [member resource_path], as the latter would error out if another resource was already cached for the given path.
</description>
</method>
</methods>
<members>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene">
+ If [code]true[/code], the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.
</member>
<member name="resource_name" type="String" setter="set_name" getter="get_name">
The name of the resource. This is an optional identifier.
diff --git a/doc/classes/ResourceFormatDDS.xml b/doc/classes/ResourceFormatDDS.xml
deleted file mode 100644
index 9717052a5d..0000000000
--- a/doc/classes/ResourceFormatDDS.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatDDS" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatImporter.xml b/doc/classes/ResourceFormatImporter.xml
deleted file mode 100644
index e5c84e6db4..0000000000
--- a/doc/classes/ResourceFormatImporter.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatImporter" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index 925706b50c..f62191413a 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -4,9 +4,9 @@
Loads a specific resource type from a file.
</brief_description>
<description>
- Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They get queried when you call [code]load[/code], or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoader are registered in the engine.
- Extending this class allows you to define your own. You should give it a global class name with [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatSaver].
- Note: You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. Example: it's better to import .PNG textures as .STEX first, so they can be loaded with better efficiency on the graphics card.
+ Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the [ResourceLoader] singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine.
+ Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a [ResourceFormatSaver].
+ Note: You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture]) first, so they can be loaded with better efficiency on the graphics card.
</description>
<tutorials>
</tutorials>
@@ -19,7 +19,7 @@
<argument index="1" name="add_types" type="String">
</argument>
<description>
- If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]Resource[/code] for them.
+ If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
<method name="get_recognized_extensions" qualifiers="virtual">
@@ -55,7 +55,7 @@
<argument index="1" name="original_path" type="String">
</argument>
<description>
- Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a resource object if succeeded, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed.
+ Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a [Resource] object on success, or an [enum @GlobalScope.Error] constant in case of failure.
</description>
</method>
<method name="rename_dependencies" qualifiers="virtual">
@@ -66,7 +66,8 @@
<argument index="1" name="renames" type="String">
</argument>
<description>
- If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String =&gt; String }[/code] mapping old dependency paths to new paths. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] in case of failure.
+ If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String =&gt; String }[/code] mapping old dependency paths to new paths.
+ Returns [constant @GlobalScope.OK] on success, or an [enum @GlobalScope.Error] constant in case of failure.
</description>
</method>
</methods>
diff --git a/doc/classes/ResourceFormatLoaderBMFont.xml b/doc/classes/ResourceFormatLoaderBMFont.xml
deleted file mode 100644
index f5b26a6ff7..0000000000
--- a/doc/classes/ResourceFormatLoaderBMFont.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderBMFont" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderBinary.xml b/doc/classes/ResourceFormatLoaderBinary.xml
deleted file mode 100644
index cf4a2373dc..0000000000
--- a/doc/classes/ResourceFormatLoaderBinary.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderBinary" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderDynamicFont.xml b/doc/classes/ResourceFormatLoaderDynamicFont.xml
deleted file mode 100644
index af06ea0d8d..0000000000
--- a/doc/classes/ResourceFormatLoaderDynamicFont.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderDynamicFont" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderGDScript.xml b/doc/classes/ResourceFormatLoaderGDScript.xml
deleted file mode 100644
index 5bb9127978..0000000000
--- a/doc/classes/ResourceFormatLoaderGDScript.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderGDScript" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderImage.xml b/doc/classes/ResourceFormatLoaderImage.xml
deleted file mode 100644
index de53d2c076..0000000000
--- a/doc/classes/ResourceFormatLoaderImage.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderImage" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderNativeScript.xml b/doc/classes/ResourceFormatLoaderNativeScript.xml
deleted file mode 100644
index 7355f702b9..0000000000
--- a/doc/classes/ResourceFormatLoaderNativeScript.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderNativeScript" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderShader.xml b/doc/classes/ResourceFormatLoaderShader.xml
deleted file mode 100644
index 1bef7485fb..0000000000
--- a/doc/classes/ResourceFormatLoaderShader.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderShader" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderStreamTexture.xml b/doc/classes/ResourceFormatLoaderStreamTexture.xml
deleted file mode 100644
index 4bdc74acbc..0000000000
--- a/doc/classes/ResourceFormatLoaderStreamTexture.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderStreamTexture" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderText.xml b/doc/classes/ResourceFormatLoaderText.xml
deleted file mode 100644
index 92ad3179bf..0000000000
--- a/doc/classes/ResourceFormatLoaderText.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderText" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderTextureLayered.xml b/doc/classes/ResourceFormatLoaderTextureLayered.xml
deleted file mode 100644
index 69c3eedf63..0000000000
--- a/doc/classes/ResourceFormatLoaderTextureLayered.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderTextureLayered" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderTheora.xml b/doc/classes/ResourceFormatLoaderTheora.xml
deleted file mode 100644
index 1b5e30f09c..0000000000
--- a/doc/classes/ResourceFormatLoaderTheora.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderTheora" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatLoaderWebm.xml b/doc/classes/ResourceFormatLoaderWebm.xml
deleted file mode 100644
index a45e5d488d..0000000000
--- a/doc/classes/ResourceFormatLoaderWebm.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatLoaderWebm" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatPKM.xml b/doc/classes/ResourceFormatPKM.xml
deleted file mode 100644
index 6c442cd934..0000000000
--- a/doc/classes/ResourceFormatPKM.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatPKM" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatPVR.xml b/doc/classes/ResourceFormatPVR.xml
deleted file mode 100644
index d82f48f207..0000000000
--- a/doc/classes/ResourceFormatPVR.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatPVR" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index caa05dce26..c40f614aa2 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -4,8 +4,8 @@
Saves a specific resource type to a file.
</brief_description>
<description>
- The engine can save resources when you do it from the editor, or when you call [method ResourceSaver.save]. This is accomplished with multiple [ResourceFormatSaver]s, each handling its own format.
- By default, Godot saves resources as [code].tres[/code], [code].res[/code] or another built-in format, but you can choose to create your own format by extending this class. You should give it a global class name with [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatLoader].
+ The engine can save resources when you do it from the editor, or when you use the [ResourceSaver] singleton. This is accomplished thanks to multiple [ResourceFormatSaver]s, each handling its own format and called automatically by the engine.
+ By default, Godot saves resources as [code].tres[/code] (text-based), [code].res[/code] (binary) or another built-in format, but you can choose to create your own format by extending this class. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatSavers, it will be called automatically when saving resources of its recognized type(s). You may also implement a [ResourceFormatLoader].
</description>
<tutorials>
</tutorials>
@@ -16,7 +16,7 @@
<argument index="0" name="resource" type="Resource">
</argument>
<description>
- Gets the list of extensions for files this saver is able to write.
+ Returns the list of extensions available for saving the resource object, provided it is recognized (see [method recognize]).
</description>
</method>
<method name="recognize" qualifiers="virtual">
@@ -25,7 +25,7 @@
<argument index="0" name="resource" type="Resource">
</argument>
<description>
- Returns [code]true[/code] if the given resource object can be saved by this saver.
+ Returns whether the given resource object can be saved by this saver.
</description>
</method>
<method name="save" qualifiers="virtual">
@@ -38,7 +38,8 @@
<argument index="2" name="flags" type="int">
</argument>
<description>
- Saves the given resource object to a file. [code]flags[/code] is a bitmask composed with [code]FLAG_*[/code] constants defined in [ResourceSaver]. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed.
+ Saves the given resource object to a file at the target [code]path[/code]. [code]flags[/code] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants.
+ Returns [constant @GlobalScope.OK] on success, or an [enum @GlobalScope.Error] constant in case of failure.
</description>
</method>
</methods>
diff --git a/doc/classes/ResourceFormatSaverBinary.xml b/doc/classes/ResourceFormatSaverBinary.xml
deleted file mode 100644
index 32c286d0d9..0000000000
--- a/doc/classes/ResourceFormatSaverBinary.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaverBinary" inherits="ResourceFormatSaver" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatSaverGDScript.xml b/doc/classes/ResourceFormatSaverGDScript.xml
deleted file mode 100644
index 0fe65e28b0..0000000000
--- a/doc/classes/ResourceFormatSaverGDScript.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaverGDScript" inherits="ResourceFormatSaver" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatSaverNativeScript.xml b/doc/classes/ResourceFormatSaverNativeScript.xml
deleted file mode 100644
index 7a699a2cca..0000000000
--- a/doc/classes/ResourceFormatSaverNativeScript.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaverNativeScript" inherits="ResourceFormatSaver" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatSaverShader.xml b/doc/classes/ResourceFormatSaverShader.xml
deleted file mode 100644
index 65ddee42fd..0000000000
--- a/doc/classes/ResourceFormatSaverShader.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaverShader" inherits="ResourceFormatSaver" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceFormatSaverText.xml b/doc/classes/ResourceFormatSaverText.xml
deleted file mode 100644
index 921de81031..0000000000
--- a/doc/classes/ResourceFormatSaverText.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceFormatSaverText" inherits="ResourceFormatSaver" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
deleted file mode 100644
index e0c0aa9a47..0000000000
--- a/doc/classes/ResourceImporter.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporter" inherits="Reference" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml
index bb9826999c..9d5a52deb2 100644
--- a/doc/classes/ResourceInteractiveLoader.xml
+++ b/doc/classes/ResourceInteractiveLoader.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.2">
<brief_description>
- Interactive Resource Loader.
+ Interactive [Resource] loader.
</brief_description>
<description>
- Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages.
+ Interactive [Resource] loader. This object is returned by [ResourceLoader] when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying loading bars/percentages.
</description>
<tutorials>
</tutorials>
@@ -13,14 +13,14 @@
<return type="Resource">
</return>
<description>
- Returns the loaded resource (only if loaded). Otherwise, returns null.
+ Returns the loaded resource if the load operation completed successfully, [code]null[/code] otherwise.
</description>
</method>
<method name="get_stage" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the load stage. The total amount of stages can be queried with [method get_stage_count]
+ Returns the load stage. The total amount of stages can be queried with [method get_stage_count].
</description>
</method>
<method name="get_stage_count" qualifiers="const">
@@ -34,13 +34,19 @@
<return type="int" enum="Error">
</return>
<description>
- Poll the load. If OK is returned, this means poll will have to be called again. If ERR_FILE_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource].
+ Polls the loading operation, i.e. loads a data chunk up to the next stage.
+ Returns [constant @GlobalScope.OK] if the poll is successful but the load operation has not finished yet (intermediate stage). This means [method poll] will have to be called again until the last stage is completed.
+ Returns [constant @GlobalScope.ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
+ Returns another [enum @GlobalScope.Error] code if the poll has failed.
</description>
</method>
<method name="wait">
<return type="int" enum="Error">
</return>
<description>
+ Polls the loading operation successively until the resource is completely loaded or a [method poll] fails.
+ Returns [constant @GlobalScope.ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
+ Returns another [enum @GlobalScope.Error] code if a poll has failed, aborting the operation.
</description>
</method>
</methods>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 76b7c39191..558852704e 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceLoader" inherits="Object" category="Core" version="3.2">
<brief_description>
- Resource Loader.
+ Singleton used to load resource files.
</brief_description>
<description>
- Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though.
+ Singleton used to load resource files from the filesystem.
+ It uses the many [ResourceFormatLoader] classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine.
+ GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios.
</description>
<tutorials>
</tutorials>
@@ -17,6 +19,8 @@
<argument index="1" name="type_hint" type="String" default="&quot;&quot;">
</argument>
<description>
+ Returns whether a recognized resource exists for the given [code]path[/code].
+ An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].
</description>
</method>
<method name="get_dependencies">
@@ -25,6 +29,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
+ Returns the dependencies for the resource at the given [code]path[/code].
</description>
</method>
<method name="get_recognized_extensions_for_type">
@@ -42,6 +47,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
+ Deprecated method. Use [method has_cached] or [method exists] instead.
</description>
</method>
<method name="has_cached">
@@ -50,6 +56,8 @@
<argument index="0" name="path" type="String">
</argument>
<description>
+ Returns whether a cached resource is available for the given [code]path[/code].
+ Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] or [method load_interactive] methods will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path.
</description>
</method>
<method name="load">
@@ -62,6 +70,11 @@
<argument index="2" name="no_cache" type="bool" default="false">
</argument>
<description>
+ Loads a resource at the given [code]path[/code], caching the result for further access.
+ The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted.
+ An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].
+ If [code]no_cache[/code] is [code]true[/code], the resource cache will be bypassed and the resource will be loaded anew. Otherwise, the cached resource will be returned if it exists.
+ Returns an empty resource if no ResourceFormatLoader could handle the file.
</description>
</method>
<method name="load_interactive">
@@ -72,7 +85,8 @@
<argument index="1" name="type_hint" type="String" default="&quot;&quot;">
</argument>
<description>
- Load a resource interactively, the returned object allows to load with high granularity.
+ Starts loading a resource interactively. The returned [ResourceInteractiveLoader] object allows to load with high granularity, calling its [method ResourceInteractiveLoader.poll] method successively to load chunks.
+ An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].
</description>
</method>
<method name="set_abort_on_missing_resources">
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index d6c635b6eb..2b00c038e1 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader.
+ GDScript has a simplified [method @GDScript.preload] built-in method which can be used in most situations, leaving the use of [ResourcePreloader] for more advanced scenarios.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index eac022f564..778ba4293f 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceSaver" inherits="Object" category="Core" version="3.2">
<brief_description>
- Resource saving interface.
+ Singleton for saving Godot-specific resource types.
</brief_description>
<description>
- Resource saving interface, used for saving resources to disk.
+ Singleton for saving Godot-specific resource types to the filesystem.
+ It uses the many [ResourceFormatSaver] classes registered in the engine (either built-in or from a plugin) to save engine-specific resource data to text-based (e.g. [code].tres[/code] or [code].tscn[/code]) or binary files (e.g. [code].res[/code] or [code].scn[/code]).
</description>
<tutorials>
</tutorials>
@@ -28,24 +29,33 @@
<argument index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0">
</argument>
<description>
- Saves a resource to disk.
+ Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object.
+ The [code]flags[/code] bitmask can be specified to customize the save behavior.
+ Returns [constant @GlobalScope.OK] on success.
</description>
</method>
</methods>
<constants>
<constant name="FLAG_RELATIVE_PATHS" value="1" enum="SaverFlags">
+ Save the resource with a path relative to the scene which uses it.
</constant>
<constant name="FLAG_BUNDLE_RESOURCES" value="2" enum="SaverFlags">
+ Bundles external resources.
</constant>
<constant name="FLAG_CHANGE_PATH" value="4" enum="SaverFlags">
+ Change the [member Resource.resource_path] of the saved resource to match its new location.
</constant>
<constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8" enum="SaverFlags">
+ Do not save editor-specific metadata (identified by their [code]__editor[/code] prefix).
</constant>
<constant name="FLAG_SAVE_BIG_ENDIAN" value="16" enum="SaverFlags">
+ Save as big endian (see [member File.endian_swap]).
</constant>
<constant name="FLAG_COMPRESS" value="32" enum="SaverFlags">
+ Compress the resource on save using [constant File.COMPRESSION_ZSTD]. Only available for binary resource types.
</constant>
<constant name="FLAG_REPLACE_SUBRESOURCE_PATHS" value="64" enum="SaverFlags">
+ Take over the paths of the saved subresources (see [method Resource.take_over_path]).
</constant>
</constants>
</class>
diff --git a/doc/classes/ResourceSaverPNG.xml b/doc/classes/ResourceSaverPNG.xml
deleted file mode 100644
index 5ed4829f25..0000000000
--- a/doc/classes/ResourceSaverPNG.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceSaverPNG" inherits="ResourceFormatSaver" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml
index 26ff67cc74..097a5f2ed2 100644
--- a/doc/classes/Sprite.xml
+++ b/doc/classes/Sprite.xml
@@ -28,6 +28,8 @@
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
+ Returns [code]true[/code], if the pixel at the given position is opaque and [code]false[/code] in other case.
+ Note: It also returns [code]false[/code], if the sprite's texture is null or if the given position is invalid.
</description>
</method>
</methods>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index af7e5a395a..6395fe2ce8 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -388,6 +388,18 @@
Converts a string containing a hexadecimal number into an integer.
</description>
</method>
+ <method name="http_escape">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="http_unescape">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="insert">
<return type="String">
</return>
@@ -757,10 +769,10 @@
</return>
<argument index="0" name="from" type="int">
</argument>
- <argument index="1" name="len" type="int">
+ <argument index="1" name="len" type="int" default="-1">
</argument>
<description>
- Returns part of the string from the position [code]from[/code] with length [code]len[/code].
+ Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using -1 will return remaining characters from given position.
</description>
</method>
<method name="to_ascii">
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 3e4b70f8f8..e818d753d8 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -44,6 +44,12 @@
Returns if the given line is foldable, that is, it has indented lines right below it.
</description>
</method>
+ <method name="center_viewport_to_cursor">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="clear_colors">
<return type="void">
</return>
@@ -105,7 +111,7 @@
<description>
Moves the cursor at the specified [code]line[/code] index.
If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. Default value is [code]true[/code].
- If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [member set_line_as_hidden]. Default value is [code]true[/code].
+ If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [method set_line_as_hidden]. Default value is [code]true[/code].
</description>
</method>
<method name="cut">
@@ -369,7 +375,7 @@
<return type="void">
</return>
<description>
- Unhide all lines that were previously set to hidden by [member set_line_as_hidden].
+ Unhide all lines that were previously set to hidden by [method set_line_as_hidden].
</description>
</method>
</methods>
@@ -404,7 +410,7 @@
If [code]true[/code], the fold gutter is visible. This enables folding groups of indented lines.
</member>
<member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled">
- If [code]true[/code], all lines that have been set to hidden by [member set_line_as_hidden], will not be visible.
+ If [code]true[/code], all lines that have been set to hidden by [method set_line_as_hidden], will not be visible.
</member>
<member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled">
If [code]true[/code], all occurrences of the selected text will be highlighted.
@@ -515,15 +521,12 @@
</constants>
<theme_items>
<theme_item name="background_color" type="Color">
- Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled.
</theme_item>
<theme_item name="bookmark_color" type="Color">
- Sets the [Color] of the bookmark marker. [member syntax_highlighting] has to be enabled.
</theme_item>
<theme_item name="brace_mismatch_color" type="Color">
</theme_item>
<theme_item name="breakpoint_color" type="Color">
- Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled.
</theme_item>
<theme_item name="caret_background_color" type="Color">
</theme_item>
@@ -550,7 +553,6 @@
<theme_item name="completion_selected_color" type="Color">
</theme_item>
<theme_item name="current_line_color" type="Color">
- Sets the current line highlight [Color]. [member highlight_current_line] has to be enabled.
</theme_item>
<theme_item name="executing_line_color" type="Color">
</theme_item>
@@ -561,48 +563,38 @@
<theme_item name="folded" type="Texture">
</theme_item>
<theme_item name="font" type="Font">
- Sets the default [Font].
</theme_item>
<theme_item name="font_color" type="Color">
- Sets the font [Color].
</theme_item>
<theme_item name="font_color_selected" type="Color">
</theme_item>
<theme_item name="function_color" type="Color">
</theme_item>
<theme_item name="line_number_color" type="Color">
- Sets the [Color] of the line numbers. [member show_line_numbers] has to be enabled.
</theme_item>
<theme_item name="line_spacing" type="int">
- Sets the spacing between the lines.
</theme_item>
<theme_item name="mark_color" type="Color">
- Sets the [Color] of marked text.
</theme_item>
<theme_item name="member_variable_color" type="Color">
</theme_item>
<theme_item name="normal" type="StyleBox">
- Sets the [StyleBox] of this [TextEdit].
</theme_item>
<theme_item name="number_color" type="Color">
</theme_item>
<theme_item name="read_only" type="StyleBox">
- Sets the [StyleBox] of this [TextEdit] when [member read_only] is enabled.
</theme_item>
<theme_item name="safe_line_number_color" type="Color">
</theme_item>
<theme_item name="selection_color" type="Color">
- Sets the highlight [Color] of text selections.
</theme_item>
<theme_item name="space" type="Texture">
</theme_item>
<theme_item name="symbol_color" type="Color">
</theme_item>
<theme_item name="tab" type="Texture">
- Sets a custom [Texture] for tab text characters.
</theme_item>
<theme_item name="word_highlighted_color" type="Color">
- Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TranslationLoaderPO.xml b/doc/classes/TranslationLoaderPO.xml
deleted file mode 100644
index d9896e1807..0000000000
--- a/doc/classes/TranslationLoaderPO.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TranslationLoaderPO" inherits="ResourceFormatLoader" category="Core" version="3.2">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 400a6e31d5..268fb5b6a5 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -31,6 +31,7 @@
<return type="Array">
</return>
<description>
+ Returns an Array of all loaded locales of the game.
</description>
</method>
<method name="get_locale" qualifiers="const">
diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml
index 37d48956f6..c2e9b9503b 100644
--- a/doc/classes/VisualShaderNodeGroupBase.xml
+++ b/doc/classes/VisualShaderNodeGroupBase.xml
@@ -109,6 +109,14 @@
<description>
</description>
</method>
+ <method name="is_valid_port_name" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="remove_input_port">
<return type="void">
</return>