summaryrefslogtreecommitdiff
path: root/doc/base/classes.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/base/classes.xml')
-rw-r--r--doc/base/classes.xml462
1 files changed, 392 insertions, 70 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index c531482950..d329d5344f 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -4340,6 +4340,15 @@
Clear the array (resize to 0).
</description>
</method>
+ <method name="count">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Return the amount of times an element is in the array.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
@@ -4363,6 +4372,15 @@
Searches the array for a value and returns its index or -1 if not found.
</description>
</method>
+ <method name="find_last">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Searches the array in reverse order for a value and returns its index or -1 if not found.
+ </description>
+ </method>
<method name="hash">
<return type="int">
</return>
@@ -5738,6 +5756,32 @@
Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.
</description>
</method>
+ <method name="set_enabled_focus_mode">
+ <argument index="0" name="mode" type="int">
+ </argument>
+ <description>
+ Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
+ </description>
+ </method>
+ <method name="get_enabled_focus_mode" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns focus access mode used when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
+ </description>
+ </method>
+ <method name="set_shortcut">
+ <argument index="0" name="shortcut" type="Object">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_shortcut" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<signals>
<signal name="released">
@@ -8971,7 +9015,7 @@
</argument>
<description>
Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previous anchor mode to the new one, so margin offsets ([method set_margin]) must be done after setting anchors, or at the same time ([method set_anchor_and_margin])
-
+
Additionally, [code]keep_margin[/code] controls whether margins should be left the same, or changed to keep the same position and size on-screen.
</description>
</method>
@@ -9171,6 +9215,13 @@
Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals.
</description>
</method>
+ <method name="get_focus_mode" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]).
+ </description>
+ </method>
<method name="has_focus" qualifiers="const">
<return type="bool">
</return>
@@ -10261,7 +10312,7 @@ This approximation makes straight segments between each point, then subdivides t
<return type="Array">
</return>
<description>
- Return the list of keys in the dictionary.
+ Return the list of keys in the [Dictionary].
</description>
</method>
<method name="parse_json">
@@ -10287,6 +10338,13 @@ This approximation makes straight segments between each point, then subdivides t
Return the dictionary as json text.
</description>
</method>
+ <method name="values">
+ <return type="Array">
+ </return>
+ <description>
+ Return the list of values in the [Dictionary].
+ </description>
+ </method>
</methods>
<constants>
</constants>
@@ -10552,6 +10610,40 @@ This approximation makes straight segments between each point, then subdivides t
<description>
</description>
</method>
+ <method name="add_fallback">
+ <argument index="0" name="data" type="DynamicFontData">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fallback">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="data" type="DynamicFontData">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_fallback" qualifiers="const">
+ <return type="DynamicFontData">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_fallback">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_fallback_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
</constants>
@@ -10586,14 +10678,14 @@ This approximation makes straight segments between each point, then subdivides t
This function is called for each file exported and
depending from the return value one of many things
might happen.
-
+
1) If returned value is null, the file is exported
as is.
-
+
2) If the returned value is a RawAray (array of
bytes), the content of that array becomes the new
file being exported.
-
+
3) If the file must also change it's name when
exported, then a [Dictionary] must be returned with
two fields: 'name' with the new filename and 'data'
@@ -10763,8 +10855,8 @@ This approximation makes straight segments between each point, then subdivides t
</brief_description>
<description>
Import plugins make it easy to handle importing of external assets
- into a project.
-
+ into a project.
+
They way they work is not that obvious though, so please make sure
to read the documentation, tutorials and examples.
</description>
@@ -10787,7 +10879,7 @@ This approximation makes straight segments between each point, then subdivides t
when exported. The only exception is in some cases
when the file must be re-imported for different
platforms (ie. texture compression).
-
+
If you want to customize the export process, it's
recommended to use [EditorExportPlugin.custom_export]
instead.
@@ -10799,7 +10891,7 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Get the name of the import plugin, which will be
used to identify content imported by this plugin.
-
+
Try to use lowecase and underscores if possible.
</description>
</method>
@@ -10824,23 +10916,23 @@ This approximation makes straight segments between each point, then subdivides t
(from the dialog) or re-import
(manual or automatic when external source files
changed).
-
+
An import process generally works like this:
-
+
1) Check the metadata for source files and options.
Metadata is either generated in the import dialog or
taken from an existing resource upon reimport.
-
+
2) Perform the import process into a new resource.
Some times the resource being re-imported may be already loaded
and in use, so checking for this by using
[ResourceLoader.has] is recommended. Otherwise
create a new resource.
-
+
3) Set the metadata from the argument into the existing or new
resource being created using
[Resource.set_import_metadata].
-
+
4) Save the resource into 'path' (function argument)
</description>
</method>
@@ -10853,12 +10945,12 @@ This approximation makes straight segments between each point, then subdivides t
when the user chooses to re-import the resource
(from filesystem). In the later case, the path for
the existing file is supplied in the argument.
-
+
If the path is supplied, it is recommended to read
the import metadata with
[ResourceLoader.load_import_metadata] and fill in
the fields with the values contained there.
-
+
The dialog can be shown in any way (just use a
ConfirmationDialog and pop it up). Upon
confirmation, fill up a ResourceImportMetadata and
@@ -10915,8 +11007,8 @@ This approximation makes straight segments between each point, then subdivides t
This method is called when the editor is about to
save the project, switch to another tab, etc. It
asks the plugin to apply any pending state changes
- to ensure consistency.
-
+ to ensure consistency.
+
This is used, for example, in shader editors to let
the plugin know that it must apply the shader code
being written by the user to the object.
@@ -10960,7 +11052,7 @@ This approximation makes straight segments between each point, then subdivides t
object type derived from CanvasItem to capture the input in the 2D editor
viewport. The function is only being called if your
object is being edited.
-
+
Return true if you want to capture the input,
otherwise false.
</description>
@@ -10977,11 +11069,11 @@ This approximation makes straight segments between each point, then subdivides t
given objet type derived from Spatial to capture the
input of the viewport. The function is only being
called if your object is being edited.
-
+
By using the [InputEvent] and the [Camera] arguments
it's pretty easy to do raycasts into space using
Camera functions.
-
+
Return true if you want to capture the input,
otherwise false.
</description>
@@ -11043,7 +11135,7 @@ This approximation makes straight segments between each point, then subdivides t
This function will be called when the editor is
requested to become visible. It is used for plugins
that edit a specific object type.
-
+
Remember that you have to manage the visibility of
all your editor controls manually.
</description>
@@ -11064,11 +11156,11 @@ This approximation makes straight segments between each point, then subdivides t
Add a custom control to a container (see
CONTAINER_* enum). There are many locations where
custom controls can be added in the editor UI.
-
+
Please remember that you have to manage the
visibility of your custom controls yourself (and likely
hide it after adding it).
-
+
If your plugin is being removed, also make sure to
remove your custom controls too.
</description>
@@ -11081,7 +11173,7 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Add a control to the bottom panel (together with
Output, Debug, Animation, etc).
-
+
If your plugin is being removed, also make sure to
remove your control by calling [method
remove_control_from_bottom_panel].
@@ -11094,12 +11186,12 @@ This approximation makes straight segments between each point, then subdivides t
</argument>
<description>
Add the control to a specific dock slot (see DOCK_*
- enum for options).
-
+ enum for options).
+
If the dock is repositioned and as long as the
plugin is active, the editor will save the dock
position on further sessions.
-
+
If your plugin is being removed, also make sure to
remove your control by calling [method
remove_control_from_docks].
@@ -11136,16 +11228,16 @@ This approximation makes straight segments between each point, then subdivides t
Add a custom type, which will appear in the list of
nodes or resources. An icon can be optionally
passed.
-
+
When given node or resource is selected, the base
type will be instanced (ie, "Spatial", "Control",
"Resource"), then the script will be loaded and set
to this object.
-
+
You can use the [EditorPlugin.handles] to check if
your custom object is being edited by checking the
- script or using 'extends' keyword.
-
+ script or using 'extends' keyword.
+
During run-time, this will be a simple object with a
script so this function does not need to be called
then.
@@ -11166,7 +11258,7 @@ This approximation makes straight segments between each point, then subdivides t
Add an import plugin. These plugins manage importing
external content (from outside the project) into
formats the engine can understand.
-
+
On exit, don't forget to remove the plugin by
calling [method remove_import_plugin]
</description>
@@ -11282,7 +11374,7 @@ This approximation makes straight segments between each point, then subdivides t
<description>
This function is called upon import with the
imported scene.
-
+
Just do any changes desired to the scene and return
it. If null is returned, import will fail and throw
an error to the user.
@@ -11372,14 +11464,14 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Object that holds the project-independent editor settings. These
settings are generally visible in the Editor Settings menu.
-
+
Accessing the settings is done by using the regular [Object] API,
such as.
-
+
settings.set(prop,value)
-
+
settings.get(prop)
-
+
list_of_settings = settings.get_property_list()
</description>
<methods>
@@ -11396,9 +11488,9 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Get the global settings path for the engine. Inside
this path you can find some standard paths such as:
-
+
settings/tmp - used for temporary storage of files
-
+
settings/templates - where export templates are
located
</description>
@@ -11474,7 +11566,7 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Commit a handle being edited (handles must have been
prevously added by [method add_handles]).
-
+
If the cancel parameter is true, an option to
restore the edited value to the original is
provided.
@@ -11488,7 +11580,7 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Get the name of an edited handle (handles must have
been previously added by [method add_handles]).
-
+
Handles can be named for reference to the user when editing.
</description>
</method>
@@ -11520,8 +11612,8 @@ This approximation makes straight segments between each point, then subdivides t
<description>
This function is used when the user drags a gizmo
handle (previously added with [method add_handles])
- in screen coordinates.
-
+ in screen coordinates.
+
The [Camera] is also provided
so screen coordinates can be converted to raycasts.
</description>
@@ -11537,7 +11629,7 @@ This approximation makes straight segments between each point, then subdivides t
Add lines to the gizmo (as sets of 2 points), with a
given material. The lines are used for visualizing
the gizmo.
-
+
Call this function during [method redraw].
</description>
</method>
@@ -11551,7 +11643,7 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Add a mesh to the gizmo, this is used for
visualization.
-
+
Call this function during [method redraw].
</description>
</method>
@@ -11568,7 +11660,7 @@ This approximation makes straight segments between each point, then subdivides t
Add collision triangles to the gizmo for picking. A
[TriangleMesh] can be generated from a regular
[Mesh] too.
-
+
Call this function during [method redraw].
</description>
</method>
@@ -11579,7 +11671,7 @@ This approximation makes straight segments between each point, then subdivides t
</argument>
<description>
Add an unscaled billboard for visualization.
-
+
Call this function during [method redraw].
</description>
</method>
@@ -11593,10 +11685,10 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Add a list of handles (points) which can be used to
deform the object being edited.
-
+
There are virtual functions which will be called
upon editing of these handles.
-
+
Call this function during [method redraw].
</description>
</method>
@@ -11606,7 +11698,7 @@ This approximation makes straight segments between each point, then subdivides t
<description>
Call this function once and upon creation of the
gizmo, otherwise no other function will work.
-
+
The argument is the node being edited by the gizmo.
</description>
</method>
@@ -14361,8 +14453,11 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="HTTPClient" inherits="Reference" category="Core">
<brief_description>
+ Hyper-text transfer protocol client.
</brief_description>
<description>
+ Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification.
+ Can be reused to connect to different hosts and make many requests.
</description>
<methods>
<method name="connect">
@@ -14386,12 +14481,14 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="connection" type="StreamPeer">
</argument>
<description>
+ Set connection to use, for this client.
</description>
</method>
<method name="get_connection" qualifiers="const">
<return type="StreamPeer">
</return>
<description>
+ Return current connection.
</description>
</method>
<method name="request_raw">
@@ -14403,9 +14500,12 @@ This approximation makes straight segments between each point, then subdivides t
</argument>
<argument index="2" name="headers" type="StringArray">
</argument>
- <argument index="3" name="body" type="RawArray" default="&quot;&quot;">
+ <argument index="3" name="body" type="RawArray">
</argument>
<description>
+ Sends a raw request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
+ Headers are HTTP request headers.
+ Sends body raw, as a byte array, does not encode it in any way.
</description>
</method>
<method name="request">
@@ -14451,30 +14551,35 @@ This approximation makes straight segments between each point, then subdivides t
</method>
<method name="close">
<description>
+ Cloces the current connection, allows for reusal of [HTTPClient].
</description>
</method>
<method name="has_response" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether this [HTTPClient] has a response available.
</description>
</method>
<method name="is_response_chunked" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether this [HTTPClient] has a response that is chunked.
</description>
</method>
<method name="get_response_code" qualifiers="const">
<return type="int">
</return>
<description>
+ Return the HTTP status code of the response.
</description>
</method>
<method name="get_response_headers">
<return type="StringArray">
</return>
<description>
+ Return the response headers.
</description>
</method>
<method name="get_response_headers_as_dictionary">
@@ -14490,32 +14595,35 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
+ Return the response's body length.
</description>
</method>
<method name="read_response_body_chunk">
<return type="RawArray">
</return>
<description>
+ Reads one chunk from the response.
</description>
</method>
<method name="set_read_chunk_size">
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Sets the size of the buffer used and maximum bytes to read per iteration
+ Sets the size of the buffer used and maximum bytes to read per iteration. see [method read_response_body_chunk]
</description>
</method>
<method name="set_blocking_mode">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- If set to true, execute will wait until all data is read from the response.
+ If set to true, execution will block until all data is read from the response.
</description>
</method>
<method name="is_blocking_mode_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether blocking mode is enabled.
</description>
</method>
<method name="get_status" qualifiers="const">
@@ -14688,8 +14796,11 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="HTTPRequest" inherits="Node" category="Core">
<brief_description>
+ A Node with the ability to send HTTP requests.
</brief_description>
<description>
+ A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS.
+ Can be used to make HTTP requests or download files via HTTP.
</description>
<methods>
<method name="request">
@@ -14702,76 +14813,91 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="ssl_validate_domain" type="bool" default="true">
</argument>
<description>
+ Make a HTTP GET request. The url is the complete url including "http://" or "https://" which will be parsed for a host and a port.
+ The custom_headers are HTTP request headers which will be used. If User-Agent is not specified a Godot specific will be used.
+ The ssl_validate_domain specifies if in case of HTTPS the server certificate should be verified.
</description>
</method>
<method name="cancel_request">
<description>
+ Cancel the current request.
</description>
</method>
<method name="get_http_client_status" qualifiers="const">
<return type="int">
</return>
<description>
+ Return the current status of the underlying [HTTPClient].
</description>
</method>
<method name="set_use_threads">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Make this HTTPRequest use threads.
</description>
</method>
<method name="is_using_threads" qualifiers="const">
<return type="bool">
</return>
<description>
+ Whether this request is using threads.
</description>
</method>
<method name="set_body_size_limit">
<argument index="0" name="bytes" type="int">
</argument>
<description>
+ Set the response body size limit.
</description>
</method>
<method name="get_body_size_limit" qualifiers="const">
<return type="int">
</return>
<description>
+ Return current body size limit.
</description>
</method>
<method name="set_max_redirects">
<argument index="0" name="amount" type="int">
</argument>
<description>
+ Set the maximum amount of redirects the request will follow.
</description>
</method>
<method name="get_max_redirects" qualifiers="const">
<return type="int">
</return>
<description>
+ Return the maximum amount of redirects that will be followed.
</description>
</method>
<method name="set_download_file">
<argument index="0" name="path" type="String">
</argument>
<description>
+ Set the file to download into. Outputs the response body into the file.
</description>
</method>
<method name="get_download_file" qualifiers="const">
<return type="String">
</return>
<description>
+ Return the file this request will download into.
</description>
</method>
<method name="get_downloaded_bytes" qualifiers="const">
<return type="int">
</return>
<description>
+ Return the amount of bytes this HTTPRequest downloaded.
</description>
</method>
<method name="get_body_size" qualifiers="const">
<return type="int">
</return>
<description>
+ Return the response body length.
</description>
</method>
</methods>
@@ -14786,31 +14912,45 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="body" type="RawArray">
</argument>
<description>
+ This signal is emitted upon request completion.
</description>
</signal>
</signals>
<constants>
<constant name="RESULT_SUCCESS" value="0">
+ Request successful.
</constant>
<constant name="RESULT_CHUNKED_BODY_SIZE_MISMATCH" value="1">
</constant>
<constant name="RESULT_CANT_CONNECT" value="2">
+ Request failed while connecting.
</constant>
<constant name="RESULT_CANT_RESOLVE" value="3">
+ Request failed while resolving.
</constant>
<constant name="RESULT_CONNECTION_ERROR" value="4">
+ Request failed due to connection(read/write) error.
</constant>
<constant name="RESULT_SSL_HANDSHAKE_ERROR" value="5">
+ Request failed on SSL handshake.
</constant>
<constant name="RESULT_NO_RESPONSE" value="6">
+ Request does not have a response(yet).
</constant>
<constant name="RESULT_BODY_SIZE_LIMIT_EXCEEDED" value="7">
+ Request exceded it's maximum size limit, see [method set_body_size_limit].
</constant>
<constant name="RESULT_REQUEST_FAILED" value="8">
+ Request failed. (unused)
</constant>
- <constant name="RESULT_REDIRECT_LIMIT_REACHED" value="11">
+ <constant name="RESULT_DOWNLOAD_FILE_CANT_OPEN" value="9">
+ HTTPRequest couldn't open the download file.
</constant>
<constant name="RESULT_DOWNLOAD_FILE_WRITE_ERROR" value="10">
+ HTTPRequest couldn't write to the download file.
+ </constant>
+ <constant name="RESULT_REDIRECT_LIMIT_REACHED" value="11">
+ Request reached it's maximum redirect limit, see [method set_max_redirects].
</constant>
</constants>
</class>
@@ -16445,6 +16585,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Whether this InputMap has an action with name "action".
</description>
</method>
<method name="get_action_id" qualifiers="const">
@@ -16453,6 +16594,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return the id of an action.
</description>
</method>
<method name="get_action_from_id" qualifiers="const">
@@ -16461,18 +16603,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="id" type="int">
</argument>
<description>
+ Return the action from an id.
+ </description>
+ </method>
+ <method name="get_actions">
+ <return type="Array">
+ </return>
+ <description>
+ Return an [Array] of all actions in the [InputMap].
</description>
</method>
<method name="add_action">
<argument index="0" name="action" type="String">
</argument>
<description>
+ Add an action to the [InputMap].
</description>
</method>
<method name="erase_action">
<argument index="0" name="action" type="String">
</argument>
<description>
+ Remove an action from the [InputMap].
</description>
</method>
<method name="action_add_event">
@@ -16481,6 +16633,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
+ Add an [InputEvent] to action. This [InputEvent] will trigger the action.
</description>
</method>
<method name="action_has_event">
@@ -16491,6 +16644,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
+ Whether an action has an [InputEvent] associated with it.
</description>
</method>
<method name="action_erase_event">
@@ -16499,6 +16653,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
+ Remove an [InputEvent] from an action.
</description>
</method>
<method name="get_action_list">
@@ -16507,6 +16662,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return an [Array] of [InputEvent]s associated with an action.
</description>
</method>
<method name="event_is_action" qualifiers="const">
@@ -16521,6 +16677,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</method>
<method name="load_from_globals">
<description>
+ Clears the [InputMap] and loads it from [Globals].
</description>
</method>
</methods>
@@ -28334,6 +28491,42 @@ This method controls whether the position between two cached points is interpola
Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index.
</description>
</method>
+ <method name="add_icon_shortcut">
+ <argument index="0" name="texture" type="Object">
+ </argument>
+ <argument index="1" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="2" name="id" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_shortcut">
+ <argument index="0" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="1" name="id" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_icon_check_shortcut">
+ <argument index="0" name="texture" type="Object">
+ </argument>
+ <argument index="1" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="2" name="id" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_check_shortcut">
+ <argument index="0" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="1" name="id" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_item_text">
<argument index="0" name="idx" type="int">
</argument>
@@ -28388,6 +28581,14 @@ This method controls whether the position between two cached points is interpola
Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked.
</description>
</method>
+ <method name="set_item_shortcut">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="shortcut" type="ShortCut">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_item_submenu">
<argument index="0" name="idx" type="int">
</argument>
@@ -28458,6 +28659,14 @@ This method controls whether the position between two cached points is interpola
Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
+ <method name="get_item_shortcut" qualifiers="const">
+ <return type="ShortCut">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_item_submenu" qualifiers="const">
<return type="String">
</return>
@@ -30019,6 +30228,14 @@ This method controls whether the position between two cached points is interpola
<description>
</description>
</method>
+ <method name="set_source_md5">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="md5" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="remove_source">
<argument index="0" name="idx" type="int">
</argument>
@@ -30850,7 +31067,7 @@ This method controls whether the position between two cached points is interpola
<return type="int">
</return>
<description>
- Return the current axis lock of the body. One of AXIS_LOCK_* enum.
+ Return the current axis lock of the body. One of AXIS_LOCK_* enum.
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
@@ -30912,13 +31129,13 @@ This method controls whether the position between two cached points is interpola
</signals>
<constants>
<constant name="MODE_STATIC" value="1">
- Static mode. The body behaves like a [StaticBody], and can only move by user code.
+ Static mode. The body behaves like a [StaticBody], and can only move by user code.
</constant>
<constant name="MODE_KINEMATIC" value="3">
- Kinematic body. The body behaves like a [KinematicBody], and can only move by user code.
+ Kinematic body. The body behaves like a [KinematicBody], and can only move by user code.
</constant>
<constant name="MODE_RIGID" value="0">
- Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
+ Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
</constant>
<constant name="MODE_CHARACTER" value="2">
</constant>
@@ -32717,8 +32934,9 @@ This method controls whether the position between two cached points is interpola
<method name="reload">
<return type="int">
</return>
+ <argument index="0" name="keep_state" type="bool" default="false">
+ </argument>
<description>
- Reload the script. This will fail if there are existing instances.
</description>
</method>
</methods>
@@ -33980,6 +34198,48 @@ This method controls whether the position between two cached points is interpola
<constants>
</constants>
</class>
+<class name="ShortCut" inherits="Resource" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="set_shortcut">
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_shortcut" qualifiers="const">
+ <return type="InputEvent">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_valid" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_shortcut" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_as_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
<class name="Skeleton" inherits="Spatial" category="Core">
<brief_description>
Skeleton for characters and animated objects.
@@ -41160,7 +41420,7 @@ This method controls whether the position between two cached points is interpola
<description>
Helper to maange UndoRedo in the editor or custom tools. It works by
storing calls to functions in both 'do' an 'undo' lists.
-
+
Common behavior is to create an action, then add do/undo calls to
functions or property changes, then commiting the action.
</description>
@@ -41284,8 +41544,8 @@ This method controls whether the position between two cached points is interpola
<description>
Get the version, each time a new action is commited,
the version number of the UndoRedo is increased
- automatically.
-
+ automatically.
+
This is useful mostly to check if something changed
from a saved version.
</description>
@@ -42348,54 +42608,63 @@ This method controls whether the position between two cached points is interpola
<return type="World2D">
</return>
<description>
+ Return the 2D world of the viewport.
</description>
</method>
<method name="set_world">
<argument index="0" name="world" type="World">
</argument>
<description>
+ Change the 3D world of the viewport.
</description>
</method>
<method name="get_world" qualifiers="const">
<return type="World">
</return>
<description>
+ Return the 3D world of the viewport.
</description>
</method>
<method name="find_world" qualifiers="const">
<return type="World">
</return>
<description>
+ Return the 3D world of the viewport, or if no such present, the one of the parent viewport.
</description>
</method>
<method name="set_canvas_transform">
<argument index="0" name="xform" type="Matrix32">
</argument>
<description>
+ Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport.
</description>
</method>
<method name="get_canvas_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
+ Get the canvas transform of the viewport.
</description>
</method>
<method name="set_global_canvas_transform">
<argument index="0" name="xform" type="Matrix32">
</argument>
<description>
+ Set the global canvas transform of the viewport. The canvas transform is relative to this.
</description>
</method>
<method name="get_global_canvas_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
+ Get the global canvas transform of the viewport.
</description>
</method>
<method name="get_final_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
+ Get the total transform of the viewport.
</description>
</method>
<method name="get_visible_rect" qualifiers="const">
@@ -42427,134 +42696,157 @@ This method controls whether the position between two cached points is interpola
<argument index="2" name="margin" type="Vector2" default="Vector2(0,0)">
</argument>
<description>
+ Set the size of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size.
</description>
</method>
<method name="get_size_override" qualifiers="const">
<return type="Vector2">
</return>
<description>
+ Get the size override set with [method set_size_override].
</description>
</method>
<method name="is_size_override_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
+ Get the enabled status of the size override set with [method set_size_override].
</description>
</method>
<method name="set_size_override_stretch">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
+ Set whether the size override affects stretch as well.
</description>
</method>
<method name="is_size_override_stretch_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
+ Get the enabled status of the size strech override set with [method set_size_override_stretch].
</description>
</method>
<method name="queue_screen_capture">
<description>
+ Queue a multithreaded screenshot, you can retrive it at a later frame via [method get_screen_capture].
</description>
</method>
<method name="get_screen_capture" qualifiers="const">
<return type="Image">
</return>
<description>
+ Return the captured screenshot after [method queue_screen_capture]. You might need to check more than one frame untill the right image is returned.
</description>
</method>
<method name="set_as_render_target">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Set the viewport's render target mode.
</description>
</method>
<method name="is_set_as_render_target" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether the viewport is set as a render target by [method set_as_render_target].
</description>
</method>
<method name="set_render_target_vflip">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Set whether the render target should be flipped on the Y axis.
</description>
</method>
<method name="get_render_target_vflip" qualifiers="const">
<return type="bool">
</return>
<description>
+ Set whether the render target is flipped on the Y axis.
</description>
</method>
<method name="set_render_target_clear_on_new_frame">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Enable/disable automatic clearing of the render target on each frame. You might find it better to disable this if you are using the viewport for rarely updated textures. To clear manually, check [method render_target_clear]
</description>
</method>
<method name="get_render_target_clear_on_new_frame" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether automatic clearing of the render target on each frame is enabled.
</description>
</method>
<method name="render_target_clear">
<description>
+ Clear the render target manually.
</description>
</method>
<method name="set_render_target_filter">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Set whether the rendered texture should have filters enabled. Disable if you want the texture's pixels be visible.
</description>
</method>
<method name="get_render_target_filter" qualifiers="const">
<return type="bool">
</return>
<description>
+ Get whether the rendered texture has filters enabled.
</description>
</method>
<method name="set_render_target_gen_mipmaps">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Set whether the rendered texture should have mipmaps generated. Mipmaps allow the texture to have better antialiasing from far away.
</description>
</method>
<method name="get_render_target_gen_mipmaps" qualifiers="const">
<return type="bool">
</return>
<description>
+ Get whether the rendered texture will have mipmaps generated.
</description>
</method>
<method name="set_render_target_update_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
+ Set when the render target should be updated, has to be one of the [code]RENDER_TARGET_UPDATE_*[/code] constants.
</description>
</method>
<method name="get_render_target_update_mode" qualifiers="const">
<return type="int">
</return>
<description>
+ Get when the render target would be updated, will be one of the [code]RENDER_TARGET_UPDATE_*[/code] constants.
</description>
</method>
<method name="get_render_target_texture" qualifiers="const">
<return type="RenderTargetTexture">
</return>
<description>
+ Get the render target's texture, for use with various objects that you want to texture with the viewport.
</description>
</method>
<method name="set_physics_object_picking">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Enable/disable picking for all physics objects inside the viewport.
</description>
</method>
<method name="get_physics_object_picking">
<return type="bool">
</return>
<description>
+ Get whether picking for all physics objects inside the viewport is enabled.
</description>
</method>
<method name="get_viewport" qualifiers="const">
@@ -42578,162 +42870,192 @@ This method controls whether the position between two cached points is interpola
</method>
<method name="update_worlds">
<description>
+ Force update of the 2D and 3D worlds.
</description>
</method>
<method name="set_use_own_world">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Make the viewport use a world separate from the parent viewport's world.
</description>
</method>
<method name="is_using_own_world" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether the viewport is using a world separate from the parent viewport's world.
</description>
</method>
<method name="get_camera" qualifiers="const">
<return type="Camera">
</return>
<description>
+ Return the active 3D camera.
</description>
</method>
<method name="set_as_audio_listener">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Makes the viewport send sounds to the speakers.
</description>
</method>
<method name="is_audio_listener" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns whether the viewport sends sounds to the speakers.
</description>
</method>
<method name="set_as_audio_listener_2d">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Makes the viewport send sounds from 2D emitters to the speakers.
</description>
</method>
<method name="is_audio_listener_2d" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns whether the viewport sends soundsfrom 2D emitters to the speakers.
</description>
</method>
<method name="set_render_target_to_screen_rect">
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
+ Map a part of the screen to the render target directly.
</description>
</method>
<method name="get_mouse_pos" qualifiers="const">
<return type="Vector2">
</return>
<description>
+ Get the mouse position, relative to the viewport.
</description>
</method>
<method name="warp_mouse">
<argument index="0" name="to_pos" type="Vector2">
</argument>
<description>
+ Wrap the mouse to a position, relative to the viewport.
</description>
</method>
<method name="gui_has_modal_stack" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returs whether there are shown modals on-screen.
</description>
</method>
<method name="gui_get_drag_data" qualifiers="const">
<return type="Variant">
</return>
<description>
+ Returs the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
</description>
</method>
<method name="set_disable_input">
<argument index="0" name="disable" type="bool">
</argument>
<description>
+ Set whether input to the viewport is disabled.
</description>
</method>
<method name="is_input_disabled" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether input to the viewport is disabled.
</description>
</method>
</methods>
<signals>
<signal name="size_changed">
<description>
+ Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
</description>
</signal>
</signals>
<constants>
<constant name="RENDER_TARGET_UPDATE_DISABLED" value="0">
+ Do not update the render target.
</constant>
<constant name="RENDER_TARGET_UPDATE_ONCE" value="1">
+ Update the render target once, then switch to [code]RENDER_TARGET_UPDATE_DISABLED[/code]
</constant>
<constant name="RENDER_TARGET_UPDATE_WHEN_VISIBLE" value="2">
+ Update the render target only when it is visible. This is the default value.
</constant>
<constant name="RENDER_TARGET_UPDATE_ALWAYS" value="3">
+ Update the render target always.
</constant>
</constants>
</class>
<class name="ViewportSprite" inherits="Node2D" category="Core">
<brief_description>
+ Displays a viewport as a sprite.
</brief_description>
<description>
+ Used to display a [Viewport] node at some position in the world, without having to mess with [RenderTargetTexture]s.
</description>
<methods>
<method name="set_viewport_path">
<argument index="0" name="path" type="NodePath">
</argument>
<description>
+ Set the path to the shown [Viewport] node.
</description>
</method>
<method name="get_viewport_path" qualifiers="const">
<return type="NodePath">
</return>
<description>
+ Return the path to the shown [Viewport] node.
</description>
</method>
<method name="set_centered">
<argument index="0" name="centered" type="bool">
</argument>
<description>
+ Set whether the viewport's texture should be centered on the origin.
</description>
</method>
<method name="is_centered" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether the viewport's texture is centered on the origin.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
+ Set the offset to the origin of the texture.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
+ get the offset to the origin of the texture.
</description>
</method>
<method name="set_modulate">
<argument index="0" name="modulate" type="Color">
</argument>
<description>
+ Set color modulation for the texture. All texture pixels are multiplied by this color. Color may contain rgb values above 1 to achieve a highlight effect.
</description>
</method>
<method name="get_modulate" qualifiers="const">
<return type="Color">
</return>
<description>
+ Get color modulation for the texture. All texture pixels are multiplied by this color.
</description>
</method>
</methods>
@@ -42769,10 +43091,10 @@ This method controls whether the position between two cached points is interpola
</methods>
<constants>
<constant name="ENABLER_FREEZE_BODIES" value="1">
- This enabler will freeze [RigidBody] nodes.
+ This enabler will freeze [RigidBody] nodes.
</constant>
<constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
- This enabler will pause [AnimationPlayer] nodes.
+ This enabler will pause [AnimationPlayer] nodes.
</constant>
<constant name="ENABLER_MAX" value="2">
</constant>
@@ -42807,21 +43129,21 @@ This method controls whether the position between two cached points is interpola
</methods>
<constants>
<constant name="ENABLER_FREEZE_BODIES" value="1">
- This enabler will freeze [RigidBody2D] nodes.
+ This enabler will freeze [RigidBody2D] nodes.
</constant>
<constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
- This enabler will pause [AnimationPlayer] nodes.
+ This enabler will pause [AnimationPlayer] nodes.
</constant>
<constant name="ENABLER_PAUSE_PARTICLES" value="2">
- This enabler will stop [Particles2D] nodes.
+ This enabler will stop [Particles2D] nodes.
</constant>
<constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5">
</constant>
<constant name="ENABLER_PARENT_PROCESS" value="3">
- This enabler will stop the parent's _process function.
+ This enabler will stop the parent's _process function.
</constant>
<constant name="ENABLER_PARENT_FIXED_PROCESS" value="4">
- This enabler will stop the parent's _fixed_process function.
+ This enabler will stop the parent's _fixed_process function.
</constant>
<constant name="ENABLER_MAX" value="6">
</constant>