diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/AudioStreamSample.xml | 12 | ||||
-rw-r--r-- | doc/classes/BaseButton.xml | 1 | ||||
-rw-r--r-- | doc/classes/Camera2D.xml | 3 | ||||
-rw-r--r-- | doc/classes/CanvasItem.xml | 1 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 26 | ||||
-rw-r--r-- | doc/classes/DynamicFont.xml | 1 | ||||
-rw-r--r-- | doc/classes/Image.xml | 1 | ||||
-rw-r--r-- | doc/classes/ImageTexture.xml | 1 | ||||
-rw-r--r-- | doc/classes/Node3D.xml | 1 | ||||
-rw-r--r-- | doc/classes/ProceduralSkyMaterial.xml | 5 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 4 | ||||
-rw-r--r-- | doc/classes/RigidBody3D.xml | 5 | ||||
-rw-r--r-- | doc/classes/TabContainer.xml | 4 | ||||
-rw-r--r-- | doc/classes/TextEdit.xml | 2 |
14 files changed, 43 insertions, 24 deletions
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 6d99433c90..c12e1bd05c 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -30,13 +30,13 @@ Audio format. See [enum Format] constants for values. </member> <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0"> - Loop start in bytes. + The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present. </member> <member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" default="0"> - Loop end in bytes. + The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present. </member> <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0"> - Loop mode. See [enum LoopMode] constants for values. + The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values. </member> <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100"> The sample rate for mixing this audio. @@ -59,13 +59,13 @@ Audio does not loop. </constant> <constant name="LOOP_FORWARD" value="1" enum="LoopMode"> - Audio loops the data between [member loop_begin] and [member loop_end] playing forward only. + Audio loops the data between [member loop_begin] and [member loop_end], playing forward only. </constant> <constant name="LOOP_PING_PONG" value="2" enum="LoopMode"> - Audio loops the data between [member loop_begin] and [member loop_end] playing back and forth. + Audio loops the data between [member loop_begin] and [member loop_end], playing back and forth. </constant> <constant name="LOOP_BACKWARD" value="3" enum="LoopMode"> - Audio loops the data between [member loop_begin] and [member loop_end] playing backward only. + Audio loops the data between [member loop_begin] and [member loop_end], playing backward only. </constant> </constants> </class> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 2147b2b4b0..5e908b0e53 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -60,6 +60,7 @@ </member> <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false"> If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it. + [b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 73892481e6..ad49216b34 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -5,7 +5,8 @@ </brief_description> <description> Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes. - This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport]. + This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, inherit from [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]). + Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position. </description> <tutorials> </tutorials> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index f2ce2a6fb9..38e4453cf2 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -9,6 +9,7 @@ Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis. A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. + [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index cf0ed8bf68..e982e00d6d 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -4,27 +4,29 @@ Dictionary type. </brief_description> <description> - Dictionary type. Associative container which contains values referenced by unique keys. Dictionary are composed of pairs of keys (which must be unique) and values. You can define a dictionary by placing a comma separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. - Erasing elements while iterating over them [b]is not supported[/b]. + Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as an hash map or associative array. + You can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. + Erasing elements while iterating over them [b]is not supported[/b] and will result in undefined behavior. Creating a dictionary: [codeblock] var my_dir = {} # Creates an empty dictionary. var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} - var my_dir = { + var another_dir = { key1: value1, key2: value2, key3: value3, } [/codeblock] - You can access values of a dictionary by referencing appropriate key in above example [code]points_dir["White"][/code] would return value of 50. + You can access a dictionary's values by referencing the appropriate key. In the above example, [code]points_dir["White"][/code] will return [code]50[/code]. You can also write [code]points_dir.White[/code], which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable). [codeblock] export(String, "White", "Yellow", "Orange") var my_color var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} func _ready(): + # We can't use dot syntax here as `my_color` is a variable. var points = points_dir[my_color] [/codeblock] - In the above code [code]points[/code] will be assigned the value that is paired with the appropriate color selected in [code]my_color[/code]. + In the above code, [code]points[/code] will be assigned the value that is paired with the appropriate color selected in [code]my_color[/code]. Dictionaries can contain more complex data: [codeblock] my_dir = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key. @@ -32,13 +34,21 @@ To add a key to an existing dictionary, access it like an existing key and assign to it: [codeblock] var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} - var points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. + points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. [/codeblock] Finally, dictionaries can contain different types of keys and values in the same dictionary: [codeblock] - var my_dir = {"String Key": 5, 4: [1, 2, 3], 7: "Hello"} # This is a valid dictionary. + # This is a valid dictionary. + # To access the string "Nested value" below, use `my_dir.sub_dir.sub_key` or `my_dir["sub_dir"]["sub_key"]`. + # Indexing styles can be mixed and matched depending on your needs. + var my_dir = { + "String Key": 5, + 4: [1, 2, 3], + 7: "Hello", + "sub_dir": {"sub_key": "Nested value"}, + } [/codeblock] - [b]Note:[/b] Unlike [Array]s you can't compare dictionaries directly: + [b]Note:[/b] Unlike [Array]s, you can't compare dictionaries directly: [codeblock] array1 = [1, 2, 3] array2 = [1, 2, 3] diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 29e430b14d..11610fa523 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -12,6 +12,7 @@ dynamic_font.size = 64 $"Label".set("custom_fonts/font", dynamic_font) [/codeblock] + [b]Note:[/b] DynamicFont doesn't support features such as right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File > Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font. </description> <tutorials> </tutorials> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index f541b0ae66..8cffe07fc0 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -5,6 +5,7 @@ </brief_description> <description> Native image datatype. Contains image data, which can be converted to a [Texture2D], and several functions to interact with it. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT]. + [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import. </description> <tutorials> </tutorials> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 1578783b8b..d122d74e85 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -5,6 +5,7 @@ </brief_description> <description> A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image]. + [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import. </description> <tutorials> </tutorials> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index ef24f638fb..3e7d4d4c05 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -6,6 +6,7 @@ <description> Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project. Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system. + [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link> diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index 70e82d248c..d3e1dbca27 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -40,11 +40,8 @@ <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="100.0"> Distance from center of sun where it fades out completely. </member> - <member name="sun_angle_min" type="float" setter="set_sun_angle_min" getter="get_sun_angle_min" default="1.0"> - Distance from sun where it goes from solid to starting to fade. - </member> <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.05"> - How quickly the sun fades away between [member sun_angle_min] and [member sun_angle_max]. + How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max]. </member> </members> <constants> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 09a19058ab..b327819a15 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -92,8 +92,10 @@ </argument> <argument index="1" name="replace_files" type="bool" default="true"> </argument> + <argument index="2" name="destination" type="String" default=""> + </argument> <description> - Loads the contents of the .pck or .zip file specified by [code]pack[/code] into the resource filesystem ([code]res://[/code]). Returns [code]true[/code] on success. + Loads the contents of the .pck or .zip file specified by [code]pack[/code] into the resource filesystem ([code]res://[/code]) at the [code]destination[/code] path, if given. Returns [code]true[/code] on success. [b]Note:[/b] If a file from [code]pack[/code] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [code]pack[/code] unless [code]replace_files[/code] is set to [code]false[/code]. </description> </method> diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index cfb9ca513e..1db818d6af 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -28,7 +28,7 @@ <argument index="0" name="force" type="Vector3"> </argument> <description> - Adds a constant directional force without affecting rotation. + Adds a constant directional force (i.e. acceleration) without affecting rotation. This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]. </description> </method> @@ -40,7 +40,8 @@ <argument index="1" name="position" type="Vector3"> </argument> <description> - Adds a constant force (i.e. acceleration). + Adds a constant directional force (i.e. acceleration). + The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="add_torque"> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index f7e94ad236..22e92ae5d9 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -36,10 +36,10 @@ <method name="get_tab_control" qualifiers="const"> <return type="Control"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="tab_idx" type="int"> </argument> <description> - Returns the currently visible tab's [Control] node. + Returns the [Control] node from the tab at index [code]tab_idx[/code]. </description> </method> <method name="get_tab_count" qualifiers="const"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index b515b27b31..b7cf93d672 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -433,6 +433,7 @@ </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" /> <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> + If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text. </member> <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false"> If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. @@ -611,6 +612,7 @@ <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> + Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. </theme_item> <theme_item name="function_color" type="Color" default="Color( 0.4, 0.64, 0.81, 1 )"> </theme_item> |