diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Camera2D.xml | 7 | ||||
-rw-r--r-- | doc/classes/CameraFeed.xml | 8 | ||||
-rw-r--r-- | doc/classes/ClippedCamera.xml | 19 | ||||
-rw-r--r-- | doc/classes/ColorPicker.xml | 2 | ||||
-rw-r--r-- | doc/classes/Input.xml | 1 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 8 | ||||
-rw-r--r-- | doc/classes/RigidBody.xml | 4 | ||||
-rw-r--r-- | doc/classes/RigidBody2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/StaticBody.xml | 2 | ||||
-rw-r--r-- | doc/classes/StaticBody2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/StreamPeer.xml | 8 | ||||
-rw-r--r-- | doc/classes/String.xml | 14 | ||||
-rw-r--r-- | doc/classes/TreeItem.xml | 18 | ||||
-rw-r--r-- | doc/classes/VideoPlayer.xml | 1 |
14 files changed, 89 insertions, 7 deletions
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index aeeebdf00d..6f1627e296 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -51,6 +51,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the specified margin. See also [member drag_margin_bottom], [member drag_margin_top], [member drag_margin_left], and [member drag_margin_right]. </description> </method> <method name="get_limit" qualifiers="const"> @@ -59,6 +60,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the specified camera limit. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]. </description> </method> <method name="make_current"> @@ -84,6 +86,7 @@ <argument index="1" name="drag_margin" type="float"> </argument> <description> + Sets the specified margin. See also [member drag_margin_bottom], [member drag_margin_top], [member drag_margin_left], and [member drag_margin_right]. </description> </method> <method name="set_limit"> @@ -94,6 +97,7 @@ <argument index="1" name="limit" type="int"> </argument> <description> + Sets the specified camera limit. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]. </description> </method> </methods> @@ -161,6 +165,7 @@ [b]Note:[/b] Used the same as [member offset_h]. </member> <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Camera2D.Camera2DProcessMode" default="1"> + The camera's process callback. See [enum Camera2DProcessMode]. </member> <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false"> If [code]true[/code], the camera rotates with the target. @@ -183,8 +188,10 @@ The camera's position takes into account vertical/horizontal offsets and the screen size. </constant> <constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessMode"> + The camera updates with the [code]_physics_process[/code] callback. </constant> <constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessMode"> + The camera updates with the [code]_process[/code] callback. </constant> </constants> </class> diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml index 6d7757f9f5..f490faf369 100644 --- a/doc/classes/CameraFeed.xml +++ b/doc/classes/CameraFeed.xml @@ -14,28 +14,30 @@ <return type="int"> </return> <description> - Gets the unique ID for this feed. + Returns the unique ID for this feed. </description> </method> <method name="get_name" qualifiers="const"> <return type="String"> </return> <description> - Gets the camera's name. + Returns the camera's name. </description> </method> <method name="get_position" qualifiers="const"> <return type="int" enum="CameraFeed.FeedPosition"> </return> <description> - Position of camera on the device. + Returns the position of camera on the device. </description> </method> </methods> <members> <member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false"> + If [code]true[/code], the feed is active. </member> <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, -1, 0, 1 )"> + The transform applied to the camera's image. </member> </members> <constants> diff --git a/doc/classes/ClippedCamera.xml b/doc/classes/ClippedCamera.xml index f6a2a3bc11..9eda79bbae 100644 --- a/doc/classes/ClippedCamera.xml +++ b/doc/classes/ClippedCamera.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ClippedCamera" inherits="Camera" category="Core" version="3.2"> <brief_description> + A [Camera] that includes collision. </brief_description> <description> + This node extends [Camera] to add collisions with [Area] and/or [PhysicsBody] nodes. The camera cannot move through colliding objects. </description> <tutorials> </tutorials> @@ -13,6 +15,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> + Adds a collision exception so the camera does not collide with the specified node. </description> </method> <method name="add_exception_rid"> @@ -21,18 +24,21 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Adds a collision exception so the camera does not collide with the specified [RID]. </description> </method> <method name="clear_exceptions"> <return type="void"> </return> <description> + Removes all collision exceptions. </description> </method> <method name="get_clip_offset" qualifiers="const"> <return type="float"> </return> <description> + Returns the distance the camera has been offset due to a collision. </description> </method> <method name="get_collision_mask_bit" qualifiers="const"> @@ -41,6 +47,8 @@ <argument index="0" name="bit" type="int"> </argument> <description> + Returns [code]true[/code] if the specified bit index is on. + [b]Note:[/b] Bit indices range from 0-19. </description> </method> <method name="remove_exception"> @@ -49,6 +57,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> + Removes a collision exception with the specified node. </description> </method> <method name="remove_exception_rid"> @@ -57,6 +66,7 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Removes a collision exception with the specified [RID]. </description> </method> <method name="set_collision_mask_bit"> @@ -67,25 +77,34 @@ <argument index="1" name="value" type="bool"> </argument> <description> + Sets the specified bit index to the [code]value[/code]. + [b]Note:[/b] Bit indices range from 0-19. </description> </method> </methods> <members> <member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled" default="false"> + If [code]true[/code], the camera stops on contact with [Area]s. </member> <member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled" default="true"> + If [code]true[/code], the camera stops on contact with [PhysicsBody]s. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> + The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> + The camera's collision margin. The camera can't get closer than this distance to a colliding object. </member> <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera.ProcessMode" default="0"> + The camera's process callback. See [enum ProcessMode]. </member> </members> <constants> <constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ProcessMode"> + The camera updates with the [code]_physics_process[/code] callback. </constant> <constant name="CLIP_PROCESS_IDLE" value="1" enum="ProcessMode"> + The camera updates with the [code]_process[/code] callback. </constant> </constants> </class> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index cd36f4fdf0..07ce76fdb2 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -51,8 +51,10 @@ [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" default="true"> + If [code]true[/code], the "add preset" button is enabled. </member> <member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true"> + If [code]true[/code], saved color presets are visible. </member> <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode" default="false"> 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). diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index afb3977849..6d4adfad51 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -71,6 +71,7 @@ <return type="int" enum="Input.CursorShape"> </return> <description> + Returns the currently assigned cursor shape (see [enum CursorShape]). </description> </method> <method name="get_gravity" qualifiers="const"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 7d009252c0..9657982016 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -403,19 +403,19 @@ Sets the window to full screen when it starts. </member> <member name="display/window/size/height" type="int" setter="" getter="" default="600"> - Sets the main window height. On desktop, this is the default window size. Stretch mode settings use this also as a reference when enabled. + Sets the game's main viewport height. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled. </member> <member name="display/window/size/resizable" type="bool" setter="" getter="" default="true"> Allows the window to be resizable by default. </member> <member name="display/window/size/test_height" type="int" setter="" getter="" default="0"> - If greater than zero, uses a different height for the window when running from the editor. The main use for this is to test with stretch modes. + If greater than zero, overrides the window height when running the game. Useful for testing stretch modes. </member> <member name="display/window/size/test_width" type="int" setter="" getter="" default="0"> - If greater than zero, uses a different width for the window when running from the editor. The main use for this is to test with stretch modes. + If greater than zero, overrides the window width when running the game. Useful for testing stretch modes. </member> <member name="display/window/size/width" type="int" setter="" getter="" default="1024"> - Sets the main window width. On desktop platforms, this is the default window size. Stretch mode settings use this also as a reference when enabled. + Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled. </member> <member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5). diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 4378fc3ffe..624b576f4d 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -88,6 +88,7 @@ <argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis"> </argument> <description> + Returns [code]true[/code] if the specified linear or rotational axis is locked. </description> </method> <method name="get_colliding_bodies" qualifiers="const"> @@ -106,6 +107,7 @@ <argument index="1" name="lock" type="bool"> </argument> <description> + Locks the specified linear or rotational axis. </description> </method> <method name="set_axis_velocity"> @@ -183,6 +185,8 @@ The body mode. See [enum Mode] for possible values. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> + The physics material override for the body. + If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false"> If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 32a1634f77..c960ef5aee 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -169,6 +169,8 @@ The body's mode. See [enum Mode] for possible values. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> + The physics material override for the body. + If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false"> If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or by using [method apply_impulse] or [method add_force]. diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml index a9709d00df..f8840ddc14 100644 --- a/doc/classes/StaticBody.xml +++ b/doc/classes/StaticBody.xml @@ -28,6 +28,8 @@ Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> + The physics material override for the body. + If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> </members> <constants> diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 4a7f71b667..34276ec535 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -27,6 +27,8 @@ Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> + The physics material override for the body. + If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> </members> <constants> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 678c587f8d..2a1919071a 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -211,6 +211,10 @@ </argument> <description> Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. + Note: To put an ASCII string without prepending its size, you can use [method put_data]: + [codeblock] + put_data("Hello world".to_ascii()) + [/codeblock] </description> </method> <method name="put_u16"> @@ -256,6 +260,10 @@ </argument> <description> Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. + Note: To put an UTF-8 string without prepending its size, you can use [method put_data]: + [codeblock] + put_data("Hello world".to_utf8()) + [/codeblock] </description> </method> <method name="put_var"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 03bc2095c0..cf152e716e 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -437,6 +437,20 @@ [/codeblock] </description> </method> + <method name="humanize_size"> + <return type="String"> + </return> + <argument index="0" name="size" type="int"> + </argument> + <description> + Converts [code]size[/code] represented as number of bytes to human-readable format using internationalized set of data size units, namely: B, KiB, MiB, GiB, TiB, PiB, EiB. Note that the next smallest unit is picked automatically to hold at most 1024 units. + [codeblock] + var bytes = 133790307 + var size = String.humanize_size(bytes) + print(size) # prints "127.5 MiB" + [/codeblock] + </description> + </method> <method name="insert"> <return type="String"> </return> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 1ab5c58a30..a4c976591f 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -120,6 +120,15 @@ Returns the custom background color of column [code]column[/code]. </description> </method> + <method name="get_custom_color" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <description> + Returns the custom color of column [code]column[/code]. + </description> + </method> <method name="get_expand_right" qualifiers="const"> <return type="bool"> </return> @@ -585,6 +594,15 @@ Sets the given column's tooltip text. </description> </method> + <method name="call_recursive" qualifiers="vararg"> + <return type="Variant"> + </return> + <argument index="0" name="method" type="String"> + </argument> + <description> + Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. + </description> + </method> </methods> <members> <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed"> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 18a85d496f..2215f26c23 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -65,6 +65,7 @@ If [code]true[/code], the video is paused. </member> <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream"> + The assigned video stream. See description for supported formats. </member> <member name="stream_position" type="float" setter="set_stream_position" getter="get_stream_position"> The current position of the stream, in seconds. |