summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Array.xml2
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml2
-rw-r--r--doc/classes/Color.xml11
-rw-r--r--doc/classes/DisplayServer.xml8
-rw-r--r--doc/classes/EditorPaths.xml6
-rw-r--r--doc/classes/EditorPlugin.xml14
-rw-r--r--doc/classes/File.xml6
-rw-r--r--doc/classes/Input.xml5
-rw-r--r--doc/classes/ResourceSaver.xml2
-rw-r--r--doc/classes/Vector2.xml17
-rw-r--r--doc/classes/Vector2i.xml11
-rw-r--r--doc/classes/Vector3.xml20
-rw-r--r--doc/classes/Vector3i.xml11
13 files changed, 92 insertions, 23 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 879b61a880..49775fa28b 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -615,7 +615,7 @@
<argument index="0" name="func" type="Callable">
</argument>
<description>
- Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
+ Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array.
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblocks]
[gdscript]
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index db46ed2778..a1759bd588 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -108,7 +108,7 @@
<member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0">
The base sound level unaffected by dampening, in decibels.
</member>
- <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="1.0">
+ <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="10.0">
The factor for the attenuation effect. Higher values make the sound audible over a larger distance.
</member>
</members>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 6133bb8d8c..ddff92e6fc 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -136,6 +136,17 @@
[/codeblocks]
</description>
</method>
+ <method name="clamp" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="min" type="Color" default="Color( 0, 0, 0, 0 )">
+ </argument>
+ <argument index="1" name="max" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Returns a new color with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="darkened" qualifiers="const">
<return type="Color">
</return>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 0c9df071a7..6c1cd37beb 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1044,12 +1044,20 @@
<constant name="FEATURE_SWAP_BUFFERS" value="17" enum="Feature">
</constant>
<constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode">
+ Makes the mouse cursor visible if it is hidden.
</constant>
<constant name="MOUSE_MODE_HIDDEN" value="1" enum="MouseMode">
+ Makes the mouse cursor hidden if it is visible.
</constant>
<constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode">
+ Captures the mouse. The mouse will be hidden and its position locked at the center of the screen.
+ [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative].
</constant>
<constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode">
+ Confines the mouse cursor to the game window, and make it visible.
+ </constant>
+ <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode">
+ Confines the mouse cursor to the game window, and make it hidden.
</constant>
<constant name="SCREEN_OF_MAIN_WINDOW" value="-1">
</constant>
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
index b92927fd53..d0d785dbb8 100644
--- a/doc/classes/EditorPaths.xml
+++ b/doc/classes/EditorPaths.xml
@@ -31,12 +31,6 @@
<description>
</description>
</method>
- <method name="get_settings_dir" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
<method name="is_self_contained" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 51ef739876..6c40b7aa9d 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -91,7 +91,7 @@
<argument index="0" name="plugin" type="EditorExportPlugin">
</argument>
<description>
- Registers a new export plugin. Export plugins are used when the project is being exported. See [EditorExportPlugin] for more information.
+ Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported.
See [method add_inspector_plugin] for an example of how to register a plugin.
</description>
</method>
@@ -101,8 +101,8 @@
<argument index="0" name="importer" type="EditorImportPlugin">
</argument>
<description>
- Registers a new import plugin. Import plugins are used to add a new [Resource] which can be imported. See [EditorImportPlugin] for more information.
- [b]Note:[/b] If you want to import custom 3d files have a look at [method add_scene_import_plugin] instead.
+ Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type.
+ [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_import_plugin] instead.
See [method add_inspector_plugin] for an example of how to register a plugin.
</description>
</method>
@@ -112,8 +112,8 @@
<argument index="0" name="plugin" type="EditorInspectorPlugin">
</argument>
<description>
- Registers a new inspector plugin. Inspector plugins are used to extend the default inspector. See [EditorInspectorPlugin] for more information.
- [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the [code]EditorInspectorPlugin[/code] if the [code]EditorPlugin[/code] is disabled.
+ Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties.
+ [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior.
[codeblocks]
[gdscript]
const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd")
@@ -134,7 +134,7 @@
<argument index="0" name="scene_importer" type="EditorSceneImporter">
</argument>
<description>
- Registers a new scene importer. Scene importers can import custom 3d formats as scenes. See [EditorImportPlugin] for more information.
+ Registers a new [EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes.
</description>
</method>
<method name="add_spatial_gizmo_plugin">
@@ -143,7 +143,7 @@
<argument index="0" name="plugin" type="EditorNode3DGizmoPlugin">
</argument>
<description>
- Registers a new gizmo plugin. Gizmo plugins are used to add custom gizmos to a [Node3D]. See [EditorNode3DGizmoPlugin] for more information.
+ Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D].
See [method add_inspector_plugin] for an example of how to register a plugin.
</description>
</method>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 2206730523..ea3b82dc54 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -490,10 +490,10 @@
</method>
</methods>
<members>
- <member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap" default="false">
+ <member name="big_endian" type="bool" setter="set_big_endian" getter="is_big_endian" default="false">
If [code]true[/code], the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If [code]false[/code], the file is read with little-endian endianness. If in doubt, leave this to [code]false[/code] as most files are written with little-endian endianness.
- [b]Note:[/b] [member endian_swap] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.
- [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member endian_swap] [i]after[/i] opening the file, not before.
+ [b]Note:[/b] [member big_endian] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.
+ [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member big_endian] [i]after[/i] opening the file, not before.
</member>
</members>
<constants>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index d7408cd0ff..ebfd32c5fb 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -449,7 +449,10 @@
[b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative].
</constant>
<constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode">
- Makes the mouse cursor visible but confines it to the game window.
+ Confines the mouse cursor to the game window, and make it visible.
+ </constant>
+ <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode">
+ Confines the mouse cursor to the game window, and make it hidden.
</constant>
<constant name="CURSOR_ARROW" value="0" enum="CursorShape">
Arrow cursor. Standard, default pointing cursor.
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index ecde5754f9..437b0ce730 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -49,7 +49,7 @@
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]).
+ Save as big endian (see [member File.big_endian]).
</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.
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 94d4b1a903..1390a5e45b 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -110,13 +110,15 @@
Returns the vector with all components rounded up (towards positive infinity).
</description>
</method>
- <method name="clamped" qualifiers="const">
+ <method name="clamp" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="length" type="float">
+ <argument index="0" name="min" type="Vector2">
+ </argument>
+ <argument index="1" name="max" type="Vector2">
</argument>
<description>
- Returns the vector with a maximum length by limiting its length to [code]length[/code].
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
<method name="cross" qualifiers="const">
@@ -232,6 +234,15 @@
Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
+ <method name="limit_length" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="length" type="float" default="1.0">
+ </argument>
+ <description>
+ Returns the vector with a maximum length by limiting its length to [code]length[/code].
+ </description>
+ </method>
<method name="move_toward" qualifiers="const">
<return type="Vector2">
</return>
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index b38b968ba3..6efb52b712 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -64,6 +64,17 @@
Returns the ratio of [member x] to [member y].
</description>
</method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="min" type="Vector2i">
+ </argument>
+ <argument index="1" name="max" type="Vector2i">
+ </argument>
+ <description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index db837d3f0c..fdddddee28 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -87,6 +87,17 @@
Returns a new vector with all components rounded up (towards positive infinity).
</description>
</method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="min" type="Vector3">
+ </argument>
+ <argument index="1" name="max" type="Vector3">
+ </argument>
+ <description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="cross" qualifiers="const">
<return type="Vector3">
</return>
@@ -207,6 +218,15 @@
Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
+ <method name="limit_length" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="length" type="float" default="1.0">
+ </argument>
+ <description>
+ Returns the vector with a maximum length by limiting its length to [code]length[/code].
+ </description>
+ </method>
<method name="max_axis" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index ea5945f5b7..6e8a34b692 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -58,6 +58,17 @@
<description>
</description>
</method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector3i">
+ </return>
+ <argument index="0" name="min" type="Vector3i">
+ </argument>
+ <argument index="1" name="max" type="Vector3i">
+ </argument>
+ <description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ </description>
+ </method>
<method name="max_axis" qualifiers="const">
<return type="int">
</return>