[DOCS] Review and improve 17 classes (#11890)

This commit is contained in:
Jérôme GULLY 2017-10-09 12:49:12 +02:00 committed by Rémi Verschelde
parent cb4830ef5e
commit 9e93f5b478
17 changed files with 120 additions and 89 deletions

View File

@ -92,8 +92,10 @@
</methods> </methods>
<members> <members>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok"> <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 accepted. Default value: [code]true[/code].
</member> </member>
<member name="dialog_text" type="String" setter="set_text" getter="get_text"> <member name="dialog_text" type="String" setter="set_text" getter="get_text">
The text displayed by this dialog.
</member> </member>
</members> </members>
<signals> <signals>

View File

@ -104,6 +104,7 @@
<return type="Array"> <return type="Array">
</return> </return>
<description> <description>
Returns a copy of this [code]Array[/code].
</description> </description>
</method> </method>
<method name="empty"> <method name="empty">

View File

@ -77,6 +77,9 @@
</methods> </methods>
<members> <members>
<member name="data" type="Dictionary" setter="_set_data" getter="_get_data"> <member name="data" type="Dictionary" setter="_set_data" getter="_get_data">
Returns a [Dictionary] with two keys :
[code]data[/code] : [PoolByteArray] with [code]true[/code]/[code]false[/code] [code]BitMap[/code] data.
[code]size[/code] : The [code]Bitmap[/code]'s size.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <class name="CanvasModulate" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description> <brief_description>
Tint the entire canvas Tint the entire canvas.
</brief_description> </brief_description>
<description> <description>
CanvasModulate tints the canvas elements using its assigned color [code]CanvasModulate[/code] tints the canvas elements using its assigned [code]color[/code].
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -30,6 +30,7 @@
</methods> </methods>
<members> <members>
<member name="color" type="Color" setter="set_color" getter="get_color"> <member name="color" type="Color" setter="set_color" getter="get_color">
The tint color to apply.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -38,6 +38,10 @@
</methods> </methods>
<members> <members>
<member name="color" type="Color" setter="set_frame_color" getter="get_frame_color"> <member name="color" type="Color" setter="set_frame_color" getter="get_frame_color">
The color to fill the [code]ColorRect[/code].
[codeblock]
$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect node's color to red
[/codeblock]
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build"> <class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
<brief_description> <brief_description>
Convex Polygon Shape. Convex polygon shape for 3D physics.
</brief_description> </brief_description>
<description> <description>
Convex polygon shape resource, which can be set into a [PhysicsBody] or area. Convex polygon shape resource, which can be added to a [PhysicsBody] or area.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -28,6 +28,7 @@
</methods> </methods>
<members> <members>
<member name="points" type="PoolVector3Array" setter="set_points" getter="get_points"> <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points">
The list of 3D points forming the convex polygon shape.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -16,7 +16,7 @@
<return type="PoolVector2Array"> <return type="PoolVector2Array">
</return> </return>
<description> <description>
Return a list of points in either clockwise or counter clockwise order, forming a convex polygon. Returns a list of points in either clockwise or counter clockwise order, forming a convex polygon.
</description> </description>
</method> </method>
<method name="set_point_cloud"> <method name="set_point_cloud">
@ -34,12 +34,13 @@
<argument index="0" name="points" type="PoolVector2Array"> <argument index="0" name="points" type="PoolVector2Array">
</argument> </argument>
<description> <description>
Set a list of points in either clockwise or counter clockwise order, forming a convex polygon. Sets a list of points in either clockwise or counter clockwise order, forming a convex polygon.
</description> </description>
</method> </method>
</methods> </methods>
<members> <members>
<member name="points" type="PoolVector2Array" setter="set_points" getter="get_points"> <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points">
The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -85,6 +85,7 @@
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive.
</description> </description>
</method> </method>
<method name="get_drive"> <method name="get_drive">

View File

@ -30,14 +30,14 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Close the currently opened file. Closes the currently opened file.
</description> </description>
</method> </method>
<method name="eof_reached" qualifiers="const"> <method name="eof_reached" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns [code]true[/code] if the file cursor reached the end of the file. Returns [code]true[/code] if the file cursor has reached the end of the file.
</description> </description>
</method> </method>
<method name="file_exists" qualifiers="const"> <method name="file_exists" qualifiers="const">
@ -46,42 +46,42 @@
<argument index="0" name="path" type="String"> <argument index="0" name="path" type="String">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the file in the specified path exists. Returns [code]true[/code] if the file exists in the given path.
</description> </description>
</method> </method>
<method name="get_16" qualifiers="const"> <method name="get_16" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the next 16 bits from the file as an integer. Returns the next 16 bits from the file as an integer.
</description> </description>
</method> </method>
<method name="get_32" qualifiers="const"> <method name="get_32" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the next 32 bits from the file as an integer. Returns the next 32 bits from the file as an integer.
</description> </description>
</method> </method>
<method name="get_64" qualifiers="const"> <method name="get_64" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the next 64 bits from the file as an integer. Returns the next 64 bits from the file as an integer.
</description> </description>
</method> </method>
<method name="get_8" qualifiers="const"> <method name="get_8" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Get the next 8 bits from the file as an integer. Returns the next 8 bits from the file as an integer.
</description> </description>
</method> </method>
<method name="get_as_text" qualifiers="const"> <method name="get_as_text" qualifiers="const">
<return type="String"> <return type="String">
</return> </return>
<description> <description>
Get the whole file as a [String]. Returns the whole file as a [String].
</description> </description>
</method> </method>
<method name="get_buffer" qualifiers="const"> <method name="get_buffer" qualifiers="const">
@ -90,7 +90,7 @@
<argument index="0" name="len" type="int"> <argument index="0" name="len" type="int">
</argument> </argument>
<description> <description>
Get next len bytes of the file as a [PoolByteArray]. Returns next [code]len[/code] bytes of the file as a [PoolByteArray].
</description> </description>
</method> </method>
<method name="get_csv_line" qualifiers="const"> <method name="get_csv_line" qualifiers="const">
@ -99,14 +99,14 @@
<argument index="0" name="delim" type="String" default="&quot;,&quot;"> <argument index="0" name="delim" type="String" default="&quot;,&quot;">
</argument> </argument>
<description> <description>
Get the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma). Returns the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma).
</description> </description>
</method> </method>
<method name="get_double" qualifiers="const"> <method name="get_double" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Get the next 64 bits from the file as a floating point number. Returns the next 64 bits from the file as a floating point number.
</description> </description>
</method> </method>
<method name="get_endian_swap"> <method name="get_endian_swap">
@ -120,14 +120,14 @@
<return type="int" enum="Error"> <return type="int" enum="Error">
</return> </return>
<description> <description>
Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope]. Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope].
</description> </description>
</method> </method>
<method name="get_float" qualifiers="const"> <method name="get_float" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Get the next 32 bits from the file as a floating point number. Returns the next 32 bits from the file as a floating point number.
</description> </description>
</method> </method>
<method name="get_len" qualifiers="const"> <method name="get_len" qualifiers="const">
@ -141,7 +141,7 @@
<return type="String"> <return type="String">
</return> </return>
<description> <description>
Get the next line of the file as a [String]. Returns the next line of the file as a [String].
</description> </description>
</method> </method>
<method name="get_md5" qualifiers="const"> <method name="get_md5" qualifiers="const">
@ -150,7 +150,7 @@
<argument index="0" name="path" type="String"> <argument index="0" name="path" type="String">
</argument> </argument>
<description> <description>
Returns a MD5 String representing the file at the given path or an empty [String] on failure. Returns an MD5 String representing the file at the given path or an empty [String] on failure.
</description> </description>
</method> </method>
<method name="get_modified_time" qualifiers="const"> <method name="get_modified_time" qualifiers="const">
@ -159,28 +159,28 @@
<argument index="0" name="file" type="String"> <argument index="0" name="file" type="String">
</argument> </argument>
<description> <description>
Returns the modified time in unix timestamp of the [code]file[/code] or returns a [String] "ERROR IN [code]file[/code]". This unix timestamp can be converted to datetime by using [method OS.get_datetime_from_unix_time]. Returns the last time the [code]file[/code] was modified in unix timestamp format or returns a [String] "ERROR IN [code]file[/code]". This unix timestamp can be converted to datetime by using [method OS.get_datetime_from_unix_time].
</description> </description>
</method> </method>
<method name="get_pascal_string"> <method name="get_pascal_string">
<return type="String"> <return type="String">
</return> </return>
<description> <description>
Get a [String] saved in Pascal format from the file. Returns a [String] saved in Pascal format from the file.
</description> </description>
</method> </method>
<method name="get_position" qualifiers="const"> <method name="get_position" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the file cursor position. Returns the file cursor's position.
</description> </description>
</method> </method>
<method name="get_real" qualifiers="const"> <method name="get_real" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Get the next bits from the file as a floating point number. Returns the next bits from the file as a floating point number.
</description> </description>
</method> </method>
<method name="get_sha256" qualifiers="const"> <method name="get_sha256" qualifiers="const">
@ -189,14 +189,14 @@
<argument index="0" name="path" type="String"> <argument index="0" name="path" type="String">
</argument> </argument>
<description> <description>
Returns a SHA-256 String representing the file at the given path or an empty [String] on failure. Returns a SHA-256 [String] representing the file at the given path or an empty [String] on failure.
</description> </description>
</method> </method>
<method name="get_var" qualifiers="const"> <method name="get_var" qualifiers="const">
<return type="Variant"> <return type="Variant">
</return> </return>
<description> <description>
Get the next Variant value from the file. Returns the next [Variant] value from the file.
</description> </description>
</method> </method>
<method name="is_open" qualifiers="const"> <method name="is_open" qualifiers="const">
@ -214,7 +214,7 @@
<argument index="1" name="flags" type="int"> <argument index="1" name="flags" type="int">
</argument> </argument>
<description> <description>
Open the file for writing or reading, depending on the flags. Opens the file for writing or reading, depending on the flags.
</description> </description>
</method> </method>
<method name="open_compressed"> <method name="open_compressed">
@ -227,7 +227,7 @@
<argument index="2" name="compression_mode" type="int" default="0"> <argument index="2" name="compression_mode" type="int" default="0">
</argument> </argument>
<description> <description>
Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants. Opens a compressed file for reading or writing. Use COMPRESSION_* constants to set [code]compression_mode[/code].
</description> </description>
</method> </method>
<method name="open_encrypted"> <method name="open_encrypted">
@ -240,7 +240,7 @@
<argument index="2" name="key" type="PoolByteArray"> <argument index="2" name="key" type="PoolByteArray">
</argument> </argument>
<description> <description>
Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
</description> </description>
</method> </method>
<method name="open_encrypted_with_pass"> <method name="open_encrypted_with_pass">
@ -253,7 +253,7 @@
<argument index="2" name="pass" type="String"> <argument index="2" name="pass" type="String">
</argument> </argument>
<description> <description>
Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. Opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
</description> </description>
</method> </method>
<method name="seek"> <method name="seek">
@ -271,7 +271,7 @@
<argument index="0" name="position" type="int" default="0"> <argument index="0" name="position" type="int" default="0">
</argument> </argument>
<description> <description>
Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file. Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file.
</description> </description>
</method> </method>
<method name="set_endian_swap"> <method name="set_endian_swap">
@ -290,7 +290,7 @@
<argument index="0" name="value" type="int"> <argument index="0" name="value" type="int">
</argument> </argument>
<description> <description>
Store an integer as 16 bits in the file. Stores an integer as 16 bits in the file.
</description> </description>
</method> </method>
<method name="store_32"> <method name="store_32">
@ -299,7 +299,7 @@
<argument index="0" name="value" type="int"> <argument index="0" name="value" type="int">
</argument> </argument>
<description> <description>
Store an integer as 32 bits in the file. Stores an integer as 32 bits in the file.
</description> </description>
</method> </method>
<method name="store_64"> <method name="store_64">
@ -308,7 +308,7 @@
<argument index="0" name="value" type="int"> <argument index="0" name="value" type="int">
</argument> </argument>
<description> <description>
Store an integer as 64 bits in the file. Stores an integer as 64 bits in the file.
</description> </description>
</method> </method>
<method name="store_8"> <method name="store_8">
@ -317,7 +317,7 @@
<argument index="0" name="value" type="int"> <argument index="0" name="value" type="int">
</argument> </argument>
<description> <description>
Store an integer as 8 bits in the file. Stores an integer as 8 bits in the file.
</description> </description>
</method> </method>
<method name="store_buffer"> <method name="store_buffer">
@ -326,7 +326,7 @@
<argument index="0" name="buffer" type="PoolByteArray"> <argument index="0" name="buffer" type="PoolByteArray">
</argument> </argument>
<description> <description>
Store the given array of bytes in the file. Stores the given array of bytes in the file.
</description> </description>
</method> </method>
<method name="store_double"> <method name="store_double">
@ -335,7 +335,7 @@
<argument index="0" name="value" type="float"> <argument index="0" name="value" type="float">
</argument> </argument>
<description> <description>
Store a floating point number as 64 bits in the file. Stores a floating point number as 64 bits in the file.
</description> </description>
</method> </method>
<method name="store_float"> <method name="store_float">
@ -344,7 +344,7 @@
<argument index="0" name="value" type="float"> <argument index="0" name="value" type="float">
</argument> </argument>
<description> <description>
Store a floating point number as 32 bits in the file. Stores a floating point number as 32 bits in the file.
</description> </description>
</method> </method>
<method name="store_line"> <method name="store_line">
@ -353,7 +353,7 @@
<argument index="0" name="line" type="String"> <argument index="0" name="line" type="String">
</argument> </argument>
<description> <description>
Store the given [String] as a line in the file. Stores the given [String] as a line in the file.
</description> </description>
</method> </method>
<method name="store_pascal_string"> <method name="store_pascal_string">
@ -362,7 +362,7 @@
<argument index="0" name="string" type="String"> <argument index="0" name="string" type="String">
</argument> </argument>
<description> <description>
Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string). Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
</description> </description>
</method> </method>
<method name="store_real"> <method name="store_real">
@ -371,7 +371,7 @@
<argument index="0" name="value" type="float"> <argument index="0" name="value" type="float">
</argument> </argument>
<description> <description>
Store a floating point number in the file. Stores a floating point number in the file.
</description> </description>
</method> </method>
<method name="store_string"> <method name="store_string">
@ -380,7 +380,7 @@
<argument index="0" name="string" type="String"> <argument index="0" name="string" type="String">
</argument> </argument>
<description> <description>
Store the given [String] in the file. Stores the given [String] in the file.
</description> </description>
</method> </method>
<method name="store_var"> <method name="store_var">
@ -389,34 +389,34 @@
<argument index="0" name="value" type="Variant"> <argument index="0" name="value" type="Variant">
</argument> </argument>
<description> <description>
Store any Variant value in the file. Stores any Variant value in the file.
</description> </description>
</method> </method>
</methods> </methods>
<constants> <constants>
<constant name="READ" value="1"> <constant name="READ" value="1">
Open the file for read operations. Opens the file for read operations.
</constant> </constant>
<constant name="WRITE" value="2"> <constant name="WRITE" value="2">
Open the file for write operations. Create it if the file does not exist and truncate if it exists. Opens the file for write operations. Create it if the file does not exist and truncate if it exists.
</constant> </constant>
<constant name="READ_WRITE" value="3"> <constant name="READ_WRITE" value="3">
Open the file for read and write operations. Does not truncate the file. Opens the file for read and write operations. Does not truncate the file.
</constant> </constant>
<constant name="WRITE_READ" value="7"> <constant name="WRITE_READ" value="7">
Open the file for read and write operations. Create it if the file does not exist and truncate if it exists. Opens the file for read and write operations. Create it if the file does not exist and truncate if it exists.
</constant> </constant>
<constant name="COMPRESSION_FASTLZ" value="0"> <constant name="COMPRESSION_FASTLZ" value="0">
Use the FastLZ compression method. Uses the FastLZ compression method.
</constant> </constant>
<constant name="COMPRESSION_DEFLATE" value="1"> <constant name="COMPRESSION_DEFLATE" value="1">
Use the Deflate compression method. Uses the Deflate compression method.
</constant> </constant>
<constant name="COMPRESSION_ZSTD" value="2"> <constant name="COMPRESSION_ZSTD" value="2">
Use the Zstd compression method. Uses the Zstd compression method.
</constant> </constant>
<constant name="COMPRESSION_GZIP" value="3"> <constant name="COMPRESSION_GZIP" value="3">
Use the GZip compression method. Uses the gzip compression method.
</constant> </constant>
</constants> </constants>
</class> </class>

View File

@ -16,6 +16,7 @@
<return type="Variant"> <return type="Variant">
</return> </return>
<description> <description>
Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref].
</description> </description>
</method> </method>
<method name="set_function"> <method name="set_function">
@ -24,7 +25,7 @@
<argument index="0" name="name" type="String"> <argument index="0" name="name" type="String">
</argument> </argument>
<description> <description>
Set the name of the function to call on the object, without parentheses or any parameters. The name of the referenced function to call on the object, without parentheses or any parameters.
</description> </description>
</method> </method>
<method name="set_instance"> <method name="set_instance">
@ -33,7 +34,7 @@
<argument index="0" name="instance" type="Object"> <argument index="0" name="instance" type="Object">
</argument> </argument>
<description> <description>
Set the object on which to call the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary]. The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary].
</description> </description>
</method> </method>
</methods> </methods>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="Gradient" inherits="Resource" category="Core" version="3.0.alpha.custom_build"> <class name="Gradient" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
<brief_description> <brief_description>
Color interpolator node Color interpolator node.
</brief_description> </brief_description>
<description> <description>
Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1. Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1.
@ -122,8 +122,10 @@
</methods> </methods>
<members> <members>
<member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors"> <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors">
Gradient's colors returned as a [PoolColorArray].
</member> </member>
<member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets"> <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets">
Gradient's offsets returned as a [PoolRealArray].
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -30,6 +30,7 @@
</methods> </methods>
<members> <members>
<member name="columns" type="int" setter="set_columns" getter="get_columns"> <member name="columns" type="int" setter="set_columns" getter="get_columns">
The number of columns in the [code]GridContainer[/code]. If modified, [code]GridContainer[/code] reorders its children to accommodate the new layout.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -4,7 +4,7 @@
A [Texture] based on an [Image]. A [Texture] based on an [Image].
</brief_description> </brief_description>
<description> <description>
A [Texture] based on an [Image]. Can be created from an [Image]. A [Texture] based on an [Image]. Can be created from an [Image] with [method create_from_image].
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -93,6 +93,7 @@
<argument index="0" name="size" type="Vector2"> <argument index="0" name="size" type="Vector2">
</argument> </argument>
<description> <description>
Resizes the [code]ImageTexture[/code] to the specified dimensions.
</description> </description>
</method> </method>
<method name="set_storage"> <method name="set_storage">

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build"> <class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
<brief_description> <brief_description>
Node to draw simple geometry from code, ala OpenGL 1.x Draws simple geometry from code.
</brief_description> </brief_description>
<description> <description>
Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -31,7 +32,7 @@
<argument index="0" name="position" type="Vector3"> <argument index="0" name="position" type="Vector3">
</argument> </argument>
<description> <description>
Add a vertex with the currently set color/uv/etc. Adds a vertex with the currently set color/uv/etc.
</description> </description>
</method> </method>
<method name="begin"> <method name="begin">
@ -50,14 +51,14 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Clear everything that was drawn using begin/end. Clears everything that was drawn using begin/end.
</description> </description>
</method> </method>
<method name="end"> <method name="end">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Call this when done adding a batch of geometry, otherwise it can't be displayed. Ends a drawing context and displays the results.
</description> </description>
</method> </method>
<method name="set_color"> <method name="set_color">
@ -66,7 +67,7 @@
<argument index="0" name="color" type="Color"> <argument index="0" name="color" type="Color">
</argument> </argument>
<description> <description>
Set the color that the next vertex will use to be drawn. The current drawing color.
</description> </description>
</method> </method>
<method name="set_normal"> <method name="set_normal">
@ -75,7 +76,7 @@
<argument index="0" name="normal" type="Vector3"> <argument index="0" name="normal" type="Vector3">
</argument> </argument>
<description> <description>
Set the normal that the next vertex will use to be drawn. The next vertex's normal.
</description> </description>
</method> </method>
<method name="set_tangent"> <method name="set_tangent">
@ -84,7 +85,7 @@
<argument index="0" name="tangent" type="Plane"> <argument index="0" name="tangent" type="Plane">
</argument> </argument>
<description> <description>
Set the tangent (and binormal facing) that the next vertex will use to be drawn. The next vertex's tangent (and binormal facing).
</description> </description>
</method> </method>
<method name="set_uv"> <method name="set_uv">
@ -93,7 +94,7 @@
<argument index="0" name="uv" type="Vector2"> <argument index="0" name="uv" type="Vector2">
</argument> </argument>
<description> <description>
Set the UV that the next vertex will use to be drawn. The next vertex's UV.
</description> </description>
</method> </method>
<method name="set_uv2"> <method name="set_uv2">
@ -102,7 +103,7 @@
<argument index="0" name="uv" type="Vector2"> <argument index="0" name="uv" type="Vector2">
</argument> </argument>
<description> <description>
Set the second layer of UV that the next vertex will use to be drawn. The next vertex's second layer UV.
</description> </description>
</method> </method>
</methods> </methods>

View File

@ -15,7 +15,7 @@
<return type="int" enum="Label.Align"> <return type="int" enum="Label.Align">
</return> </return>
<description> <description>
Return the alignment mode (any of the ALIGN_* enumeration values). Returns the alignment mode (any of the ALIGN_* enumeration values).
</description> </description>
</method> </method>
<method name="get_line_count" qualifiers="const"> <method name="get_line_count" qualifiers="const">
@ -36,76 +36,77 @@
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the the number of lines to skipped before displaying. Returns the the number of lines to skip before displaying.
</description> </description>
</method> </method>
<method name="get_max_lines_visible" qualifiers="const"> <method name="get_max_lines_visible" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the restricted number of lines to display. Returns -1 if unrestricted. Returns the maximum number of lines to display. Returns -1 if unrestricted.
</description> </description>
</method> </method>
<method name="get_percent_visible" qualifiers="const"> <method name="get_percent_visible" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Return the restricted number of characters to display (as a percentage of the total text). Returns the maximum number of characters to display as a percentage of the total text.
</description> </description>
</method> </method>
<method name="get_text" qualifiers="const"> <method name="get_text" qualifiers="const">
<return type="String"> <return type="String">
</return> </return>
<description> <description>
Return the label text. Text can contain newlines. Returns the label text. Text can contain newlines.
</description> </description>
</method> </method>
<method name="get_total_character_count" qualifiers="const"> <method name="get_total_character_count" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the total length of the text. Returns the total length of the text.
</description> </description>
</method> </method>
<method name="get_valign" qualifiers="const"> <method name="get_valign" qualifiers="const">
<return type="int" enum="Label.VAlign"> <return type="int" enum="Label.VAlign">
</return> </return>
<description> <description>
Return the vertical alignment mode (any of the VALIGN_* enumeration values). Returns the vertical alignment mode (any of the VALIGN_* enumeration values).
</description> </description>
</method> </method>
<method name="get_visible_characters" qualifiers="const"> <method name="get_visible_characters" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the restricted number of characters to display. Returns -1 if unrestricted. Returns the restricted number of characters to display. Returns -1 if unrestricted.
</description> </description>
</method> </method>
<method name="get_visible_line_count" qualifiers="const"> <method name="get_visible_line_count" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the number of lines shown. Useful if the [code]Label[/code] 's height cannot currently display all lines.
</description> </description>
</method> </method>
<method name="has_autowrap" qualifiers="const"> <method name="has_autowrap" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]). Returns [code]true[/code] if [i]autowrap[/i] mode (see [method set_autowrap]).
</description> </description>
</method> </method>
<method name="is_clipping_text" qualifiers="const"> <method name="is_clipping_text" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return [code]true[/code] if text would be cut off if it is too wide. Returns [code]true[/code] if text would be cut off if it is too wide.
</description> </description>
</method> </method>
<method name="is_uppercase" qualifiers="const"> <method name="is_uppercase" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return [code]true[/code] if text is displayed in all capitals. Returns [code]true[/code] if text is displayed in all capitals.
</description> </description>
</method> </method>
<method name="set_align"> <method name="set_align">

View File

@ -5,7 +5,7 @@
</brief_description> </brief_description>
<description> <description>
A Texture capable of storing many smaller Textures with offsets. A Texture capable of storing many smaller Textures with offsets.
You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets. You can dynamically add pieces([Texture]) to this [code]LargeTexture[/code] using different offsets.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -20,21 +20,21 @@
<argument index="1" name="texture" type="Texture"> <argument index="1" name="texture" type="Texture">
</argument> </argument>
<description> <description>
Add another [Texture] to this [LargeTexture], starting on offset "ofs". Add another [Texture] to this [code]LargeTexture[/code], starting on offset "ofs".
</description> </description>
</method> </method>
<method name="clear"> <method name="clear">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Clear the [LargeTexture]. Clears the [code]LargeTexture[/code].
</description> </description>
</method> </method>
<method name="get_piece_count" qualifiers="const"> <method name="get_piece_count" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the number of pieces currently in this [LargeTexture]. Returns the number of pieces currently in this [code]LargeTexture[/code].
</description> </description>
</method> </method>
<method name="get_piece_offset" qualifiers="const"> <method name="get_piece_offset" qualifiers="const">
@ -43,7 +43,7 @@
<argument index="0" name="idx" type="int"> <argument index="0" name="idx" type="int">
</argument> </argument>
<description> <description>
Return the offset of the piece with index "idx". Returns the offset of the piece with index "idx".
</description> </description>
</method> </method>
<method name="get_piece_texture" qualifiers="const"> <method name="get_piece_texture" qualifiers="const">
@ -52,7 +52,7 @@
<argument index="0" name="idx" type="int"> <argument index="0" name="idx" type="int">
</argument> </argument>
<description> <description>
Return the [Texture] of the piece with index "idx". Returns the [Texture] of the piece with index "idx".
</description> </description>
</method> </method>
<method name="set_piece_offset"> <method name="set_piece_offset">
@ -63,7 +63,7 @@
<argument index="1" name="ofs" type="Vector2"> <argument index="1" name="ofs" type="Vector2">
</argument> </argument>
<description> <description>
Set the offset of the piece with index "idx" to "ofs". Sets the offset of the piece with index "idx" to "ofs".
</description> </description>
</method> </method>
<method name="set_piece_texture"> <method name="set_piece_texture">
@ -74,7 +74,7 @@
<argument index="1" name="texture" type="Texture"> <argument index="1" name="texture" type="Texture">
</argument> </argument>
<description> <description>
Set the [Texture] of the piece with index "idx" to "ofs". Sets the [Texture] of the piece with index "idx" to "ofs".
</description> </description>
</method> </method>
<method name="set_size"> <method name="set_size">
@ -83,12 +83,16 @@
<argument index="0" name="size" type="Vector2"> <argument index="0" name="size" type="Vector2">
</argument> </argument>
<description> <description>
Set the size of this [LargeTexture]. Sets the size of this [code]LargeTexture[/code].
</description> </description>
</method> </method>
</methods> </methods>
<members> <members>
<member name="_data" type="Array" setter="_set_data" getter="_get_data"> <member name="_data" type="Array" setter="_set_data" getter="_get_data">
Returns an [Array] with offsets and textures data of each added piece. Schema is [offsets1, texture1, offsets2, texture2, large_texture_size].
[code]offsets[/code] : [Vector2] offsets of the texture piece.
[code]second[/code] : [StreamTexture] data of the texture piece.
[code]last entry[/code] : [Vector2] size of the entire large texture.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="Light2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <class name="Light2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description> <brief_description>
Node that casts light in a 2D environment. Casts light in a 2D environment.
</brief_description> </brief_description>
<description> <description>
Node that casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask. Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -385,7 +385,7 @@
If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code]. If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code].
</member> </member>
<member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter"> <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter">
Shadow filter type. May be one of [code][None, PCF5, PCF9, PCF13][/code]. Default value: [code]None[/code]. Shadow filter type. Use SHADOW_FILTER_* constants to set [code]shadow_filter[/code]. Default value: [code]None[/code].
</member> </member>
<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth"> <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth">
Smoothing value for shadows. Smoothing value for shadows.
@ -408,7 +408,7 @@
Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light. Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light.
</constant> </constant>
<constant name="MODE_SUB" value="1"> <constant name="MODE_SUB" value="1">
Subtract the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
</constant> </constant>
<constant name="MODE_MIX" value="2"> <constant name="MODE_MIX" value="2">
Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.
@ -417,16 +417,22 @@
The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture. The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture.
</constant> </constant>
<constant name="SHADOW_FILTER_NONE" value="0"> <constant name="SHADOW_FILTER_NONE" value="0">
No filter applies to the shadow map. See [method shadow_filter].
</constant> </constant>
<constant name="SHADOW_FILTER_PCF3" value="1"> <constant name="SHADOW_FILTER_PCF3" value="1">
Percentage closer filtering (3 samples) applies to the shadow map. See [method shadow_filter].
</constant> </constant>
<constant name="SHADOW_FILTER_PCF5" value="2"> <constant name="SHADOW_FILTER_PCF5" value="2">
Percentage closer filtering (5 samples) applies to the shadow map. See [method shadow_filter].
</constant> </constant>
<constant name="SHADOW_FILTER_PCF7" value="3"> <constant name="SHADOW_FILTER_PCF7" value="3">
Percentage closer filtering (7 samples) applies to the shadow map. See [method shadow_filter].
</constant> </constant>
<constant name="SHADOW_FILTER_PCF9" value="4"> <constant name="SHADOW_FILTER_PCF9" value="4">
Percentage closer filtering (9 samples) applies to the shadow map. See [method shadow_filter].
</constant> </constant>
<constant name="SHADOW_FILTER_PCF13" value="5"> <constant name="SHADOW_FILTER_PCF13" value="5">
Percentage closer filtering (13 samples) applies to the shadow map. See [method shadow_filter].
</constant> </constant>
</constants> </constants>
</class> </class>