diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/base/classes.xml | 196 |
1 files changed, 157 insertions, 39 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml index e553e95890..070046d100 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -313,7 +313,7 @@ <method name="seed"> <return type="Nil"> </return> - <argument index="0" name="seed" type="float"> + <argument index="0" name="seed" type="int"> </argument> <description> Set seed for the random number generator. @@ -322,7 +322,7 @@ <method name="rand_seed"> <return type="Array"> </return> - <argument index="0" name="seed" type="float"> + <argument index="0" name="seed" type="int"> </argument> <description> Random from seed, pass a seed and an array with both number and new seed is returned. @@ -6883,6 +6883,12 @@ Return a rect containing the editable contents of the item. </description> </method> + <method name="get_item_and_children_rect" qualifiers="const"> + <return type="Rect2"> + </return> + <description> + </description> + </method> <method name="get_canvas_item" qualifiers="const"> <return type="RID"> </return> @@ -8453,7 +8459,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Resize the array. + Set the size of the [ColorArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -8462,7 +8468,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Set an index in the array. + Change the [Color] at the given index. </description> </method> <method name="size"> @@ -12439,6 +12445,14 @@ This approximation makes straight segments between each point, then subdivides t else, empty String "". </description> </method> + <method name="get_sha256" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> <method name="get_endian_swap"> <return type="bool"> </return> @@ -15837,6 +15851,27 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <description> Returns the duration of the current vibration effect in seconds. </description> + </method> + <method name="start_joy_vibration"> + <argument index="0" name="device" type="int"> + </argument> + <argument index="1" name="weak_magnitude" type="float"> + </argument> + <argument index="2" name="strong_magnitude" type="float"> + </argument> + <argument index="3" name="duration" type="float"> + </argument> + <description> + Starts to vibrate the joystick. Joysticks usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will play the vibration indefinitely). + </description> + </method> + <method name="stop_joy_vibration"> + <argument index="0" name="device" type="int"> + </argument> + <description> + Stops the vibration of the joystick. + </description> + </method> <method name="get_accelerometer"> <return type="Vector3"> </return> @@ -15879,26 +15914,6 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) Return the mouse mode. See the constants for more information. </description> </method> - <method name="start_joy_vibration"> - <argument index="0" name="device" type="int"> - </argument> - <argument index="1" name="weak_magnitude" type="float"> - </argument> - <argument index="2" name="strong_magnitude" type="float"> - </argument> - <argument index="3" name="duration" type="float"> - </argument> - <description> - Starts to vibrate the joystick. Joysticks usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will play the vibration indefinitely). - </description> - </method> - <method name="stop_joy_vibration"> - <argument index="0" name="device" type="int"> - </argument> - <description> - Stops the vibration of the joystick. - </description> - </method> <method name="warp_mouse_pos"> <argument index="0" name="to" type="Vector2"> </argument> @@ -16966,7 +16981,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="idx" type="int"> </argument> <description> - Resize the array. + Set the size of the [IntArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -16975,7 +16990,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="1" name="integer" type="int"> </argument> <description> - Set an index in the array. + Change the int at the given index. </description> </method> <method name="size"> @@ -20485,22 +20500,27 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) </class> <class name="Mutex" inherits="Reference" category="Core"> <brief_description> + A synchronization Mutex. </brief_description> <description> + A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section. </description> <methods> <method name="lock"> <description> + Lock this [Mutex], blocks until it is unlocked by the current owner. </description> </method> <method name="try_lock"> <return type="Error"> </return> <description> + Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY]. </description> </method> <method name="unlock"> <description> + Unlock this [Mutex], leaving it to others threads. </description> </method> </methods> @@ -23471,7 +23491,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) </description> <methods> <method name="get_var" qualifiers="const"> + <return type="Variant"> + </return> <description> + Get a Variant. </description> </method> <method name="put_var"> @@ -23480,12 +23503,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="var" type="Variant"> </argument> <description> + Send a Variant as a packet. </description> </method> <method name="get_packet" qualifiers="const"> <return type="RawArray"> </return> <description> + Get a raw packet. </description> </method> <method name="put_packet"> @@ -23494,18 +23519,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="buffer" type="RawArray"> </argument> <description> + Send a raw packet. </description> </method> <method name="get_packet_error" qualifiers="const"> <return type="Error"> </return> <description> + Return the error state of the last packet received (via [method get_packet] and [method get_var]). </description> </method> <method name="get_available_packet_count" qualifiers="const"> <return type="int"> </return> <description> + Return the number of packets currently available in the ring-buffer. </description> </method> </methods> @@ -23533,8 +23561,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) </class> <class name="PacketPeerUDP" inherits="PacketPeer" category="Core"> <brief_description> + UDP packet peer. </brief_description> <description> + UDP packet peer. Can be used to send raw UDP packets as well as [Variant]s. </description> <methods> <method name="listen"> @@ -23545,40 +23575,47 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="1" name="recv_buf_size" type="int" default="65536"> </argument> <description> + Make this [PacketPeerUDP] listen on the "port" using a buffer size "recv_buf_size". Listens on all available adresses. </description> </method> <method name="close"> <description> + Close the UDP socket the [PacketPeerUDP] is currently listening on. </description> </method> <method name="wait"> <return type="Error"> </return> <description> + Wait for a packet to arrive on the listening port, see [method listen]. </description> </method> <method name="is_listening" qualifiers="const"> <return type="bool"> </return> <description> + Return whether this [PacketPeerUDP] is listening. </description> </method> <method name="get_packet_ip" qualifiers="const"> <return type="String"> </return> <description> + Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]). </description> </method> <method name="get_packet_address" qualifiers="const"> <return type="int"> </return> <description> + Return the address of the remote peer(as a 32bit integer) that sent the last packet(that was received with [method get_packet] or [method get_var]). </description> </method> <method name="get_packet_port" qualifiers="const"> <return type="int"> </return> <description> + Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]). </description> </method> <method name="set_send_address"> @@ -23589,6 +23626,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="1" name="port" type="int"> </argument> <description> + Set the destination address and port for sending packets and variables, a hostname will be resolved if valid. </description> </method> </methods> @@ -29964,12 +30002,14 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="byte" type="int"> </argument> <description> + Append an element at the end of the array. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> + Set the size of the [RawArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -29978,12 +30018,14 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="byte" type="int"> </argument> <description> + Change the byte at the given index. </description> </method> <method name="size"> <return type="int"> </return> <description> + Return the size of the array. </description> </method> <method name="RawArray"> @@ -29992,6 +30034,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="from" type="Array"> </argument> <description> + Create from a generic array. </description> </method> </methods> @@ -30305,12 +30348,14 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="value" type="float"> </argument> <description> + Append an element at the end of the array. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> + Set the size of the [RealArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -30319,12 +30364,14 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="value" type="float"> </argument> <description> + Change the float at the given index. </description> </method> <method name="size"> <return type="int"> </return> <description> + Return the size of the array. </description> </method> <method name="RealArray"> @@ -30333,6 +30380,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="from" type="Array"> </argument> <description> + Create from a generic array. </description> </method> </methods> @@ -33637,20 +33685,24 @@ This method controls whether the position between two cached points is interpola </class> <class name="Semaphore" inherits="Reference" category="Core"> <brief_description> + A synchronization Semaphore. </brief_description> <description> + A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation. </description> <methods> <method name="wait"> <return type="Error"> </return> <description> + Tries to wait for the [Semaphore], if it's value is zero, blocks until non-zero. </description> </method> <method name="post"> <return type="Error"> </return> <description> + Lowers the [Semaphore], allowing one more thread in. </description> </method> </methods> @@ -36681,150 +36733,175 @@ This method controls whether the position between two cached points is interpola <return type="int"> </return> <description> + Return the amount of bytes this [StreamPeer] has available. </description> </method> <method name="set_big_endian"> <argument index="0" name="enable" type="bool"> </argument> <description> + Set this [StreamPeer] to use big-endian format. Default is false. </description> </method> <method name="is_big_endian_enabled" qualifiers="const"> <return type="bool"> </return> <description> + Return whether this [StreamPeer] is using big-endian format. </description> </method> <method name="put_8"> <argument index="0" name="val" type="int"> </argument> <description> + Put a signed byte into the stream. </description> </method> <method name="put_u8"> <argument index="0" name="val" type="int"> </argument> <description> + Put an unsigned byte into the stream. </description> </method> <method name="put_16"> <argument index="0" name="val" type="int"> </argument> <description> + Put a signed 16 bit value into the stream. </description> </method> <method name="put_u16"> <argument index="0" name="val" type="int"> </argument> <description> + Put an unsigned 16 bit value into the stream. </description> </method> <method name="put_32"> <argument index="0" name="val" type="int"> </argument> <description> + Put a signed 32 bit value into the stream. </description> </method> <method name="put_u32"> <argument index="0" name="val" type="int"> </argument> <description> + Put an unsigned 32 bit value into the stream. </description> </method> <method name="put_64"> <argument index="0" name="val" type="int"> </argument> <description> + Put a signed 64 bit value into the stream. </description> </method> <method name="put_u64"> <argument index="0" name="val" type="int"> </argument> <description> + Put an unsigned 64 bit value into the stream. </description> </method> <method name="put_float"> <argument index="0" name="val" type="float"> </argument> <description> + Put a single-precision float into the stream. </description> </method> <method name="put_double"> <argument index="0" name="val" type="float"> </argument> <description> + Put a double-precision float into the stream. </description> </method> <method name="put_utf8_string"> <argument index="0" name="val" type="String"> </argument> <description> + Put a zero-terminated utf8 string into the stream. </description> </method> <method name="put_var"> <argument index="0" name="val" type="Variant"> </argument> <description> + Put a Variant into the stream. </description> </method> <method name="get_8"> <return type="int"> </return> <description> + Get a signed byte from the stream. </description> </method> <method name="get_u8"> <return type="int"> </return> <description> + Get an unsigned byte from the stream. </description> </method> <method name="get_16"> <return type="int"> </return> <description> + Get a signed 16 bit value from the stream. </description> </method> <method name="get_u16"> <return type="int"> </return> <description> + Get an unsigned 16 bit value from the stream. </description> </method> <method name="get_32"> <return type="int"> </return> <description> + Get a signed 32 bit value from the stream. </description> </method> <method name="get_u32"> <return type="int"> </return> <description> + Get an unsigned 32 bit value from the stream. </description> </method> <method name="get_64"> <return type="int"> </return> <description> + Get a signed 64 bit value from the stream. </description> </method> <method name="get_u64"> <return type="int"> </return> <description> + Get an unsigned 16 bit value from the stream. </description> </method> <method name="get_float"> <return type="float"> </return> <description> + Get a single-precision float from the stream. </description> </method> <method name="get_double"> <return type="float"> </return> <description> + Get a double-precision float from the stream. </description> </method> <method name="get_string"> @@ -36833,6 +36910,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="bytes" type="int"> </argument> <description> + Get a string with byte-length "bytes" from the stream. </description> </method> <method name="get_utf8_string"> @@ -36841,12 +36919,14 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="bytes" type="int"> </argument> <description> + Get an utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8). </description> </method> <method name="get_var"> <return type="Variant"> </return> <description> + Get a Variant from the stream. </description> </method> </methods> @@ -36855,8 +36935,10 @@ This method controls whether the position between two cached points is interpola </class> <class name="StreamPeerSSL" inherits="StreamPeer" category="Core"> <brief_description> + SSL Stream peer. </brief_description> <description> + SSL Stream peer. This object can be used to connect to SSL servers. </description> <methods> <method name="accept"> @@ -36877,27 +36959,34 @@ This method controls whether the position between two cached points is interpola <argument index="2" name="for_hostname" type="String" default=""""> </argument> <description> + Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname". </description> </method> <method name="get_status" qualifiers="const"> <return type="int"> </return> <description> + Return the status of the connection, one of STATUS_* enum. </description> </method> <method name="disconnect"> <description> + Disconnect from host. </description> </method> </methods> <constants> <constant name="STATUS_DISCONNECTED" value="0"> + A status representing a [StreamPeerSSL] that is disconnected. </constant> <constant name="STATUS_CONNECTED" value="1"> + A status representing a [StreamPeerSSL] that is connected to a host. </constant> <constant name="STATUS_ERROR_NO_CERTIFICATE" value="2"> + An errot status that shows the peer did not present a SSL certificate and validation was requested. </constant> <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="3"> + An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. </constant> </constants> </class> @@ -36917,45 +37006,55 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="port" type="int"> </argument> <description> + Connect to the specified IP:port pair. Returns [OK] on success or [FAILED] on failure. </description> </method> <method name="is_connected" qualifiers="const"> <return type="bool"> </return> <description> + Return whether this peer is connected. Returns true while connecting and connected. </description> </method> <method name="get_status" qualifiers="const"> <return type="int"> </return> <description> + Return the status of the connection, one of STATUS_* enum. </description> </method> <method name="get_connected_host" qualifiers="const"> <return type="String"> </return> <description> + Return the IP of this peer. </description> </method> <method name="get_connected_port" qualifiers="const"> <return type="int"> </return> <description> + Return the port of this peer. </description> </method> <method name="disconnect"> <description> + Disconnect from host. </description> </method> </methods> <constants> <constant name="STATUS_NONE" value="0"> + The initial status of the [StreamPeerTCP], also the status after a disconnect. </constant> <constant name="STATUS_CONNECTING" value="1"> + A status representing a [StreamPeerTCP] that is connecting to a host. </constant> <constant name="STATUS_CONNECTED" value="2"> + A status representing a [StreamPeerTCP] that is connected to a host. </constant> <constant name="STATUS_ERROR" value="3"> + A staus representing a [StreamPeerTCP] in error state. </constant> </constants> </class> @@ -37522,6 +37621,12 @@ This method controls whether the position between two cached points is interpola Return the right side of the string from a given position. </description> </method> + <method name="sha256_text"> + <return type="String"> + </return> + <description> + </description> + </method> <method name="split"> <return type="StringArray"> </return> @@ -37645,7 +37750,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="idx" type="int"> </argument> <description> - Reset the size of the array. + Set the size of the [StringArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -37654,6 +37759,7 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="string" type="String"> </argument> <description> + Change the [String] at the given index. </description> </method> <method name="size"> @@ -37669,6 +37775,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="from" type="Array"> </argument> <description> + Create from a generic array. </description> </method> </methods> @@ -39569,8 +39676,10 @@ This method controls whether the position between two cached points is interpola </class> <class name="Thread" inherits="Reference" category="Core"> <brief_description> + A unit of execution in a process. </brief_description> <description> + A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects. </description> <methods> <method name="start"> @@ -39585,24 +39694,29 @@ This method controls whether the position between two cached points is interpola <argument index="3" name="priority" type="int" default="1"> </argument> <description> + Start a new [Thread], it will run "method" on object "instance" using "userdata" as an argument and running with "priority", one of PRIORITY_* enum. + Returns OK on success, or ERR_CANT_CREATE on failure. </description> </method> <method name="get_id" qualifiers="const"> <return type="String"> </return> <description> + Return the id of the thread, uniquely identifying it among all threads. </description> </method> <method name="is_active" qualifiers="const"> <return type="bool"> </return> <description> + Whether this thread is currently active, an active Thread cannot start work on a new method but can be joined with [method wait_to_finish]. </description> </method> <method name="wait_to_finish"> <return type="Variant"> </return> <description> + Joins the [Thread] and waits for it to finish. Returns what the method called returned. </description> </method> </methods> @@ -41105,6 +41219,8 @@ This method controls whether the position between two cached points is interpola </theme_item> <theme_item name="hseparation" type="int"> </theme_item> + <theme_item name="draw_relationship_lines" type="int"> + </theme_item> <theme_item name="button_margin" type="int"> </theme_item> <theme_item name="title_button_color" type="Color"> @@ -41119,6 +41235,8 @@ This method controls whether the position between two cached points is interpola </theme_item> <theme_item name="font_color" type="Color"> </theme_item> + <theme_item name="relationship_line_color" type="Color"> + </theme_item> <theme_item name="drop_position_color" type="Color"> </theme_item> <theme_item name="arrow" type="Texture"> @@ -42520,14 +42638,14 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="vector2" type="Vector2"> </argument> <description> - Inserts a Vector2 at the end. + Insert a [Vector2] at the end. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Sets the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. + Set the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -42536,14 +42654,14 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="vector2" type="Vector2"> </argument> <description> - Changes the Vector2 at the given index. + Change the [Vector2] at the given index. </description> </method> <method name="size"> <return type="int"> </return> <description> - Returns the size of the array. + Return the size of the array. </description> </method> <method name="Vector2Array"> @@ -42552,7 +42670,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new Vector2Array. Optionally, you can pass in an Array that will be converted. + Construct a new [Vector2Array]. Optionally, you can pass in an Array that will be converted. </description> </method> </methods> @@ -42779,14 +42897,14 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="vector3" type="Vector3"> </argument> <description> - Inserts a Vector3 at the end. + Insert a Vector3 at the end. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Sets the size of the Vector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. + Set the size of the Vector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -42795,14 +42913,14 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="vector3" type="Vector3"> </argument> <description> - Changes the Vector3 at the given index. + Change the [Vector3] at the given index. </description> </method> <method name="size"> <return type="int"> </return> <description> - Returns the size of the array. + Return the size of the array. </description> </method> <method name="Vector3Array"> @@ -42811,7 +42929,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="from" type="Array"> </argument> <description> - Constructs a new Vector3Array. Optionally, you can pass in an Array that will be converted. + Construct a new Vector3Array. Optionally, you can pass in an Array that will be converted. </description> </method> </methods> @@ -42884,7 +43002,7 @@ This method controls whether the position between two cached points is interpola <description> </description> </method> - <method name="get_linear_velocity"> + <method name="get_linear_velocity" qualifiers="const"> <return type="Vector3"> </return> <description> @@ -45292,7 +45410,7 @@ This method controls whether the position between two cached points is interpola <description> </description> </method> - <method name="free"> + <method name="free_rid"> <argument index="0" name="arg0" type="RID"> </argument> <description> |