diff options
Diffstat (limited to 'doc/classes/SceneTree.xml')
-rw-r--r-- | doc/classes/SceneTree.xml | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index bd81a48ff5..1499173d6b 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SceneTree" inherits="MainLoop" category="Core" version="3.2"> +<class name="SceneTree" inherits="MainLoop" version="4.0"> <brief_description> Manages the game loop via a hierarchy of nodes. </brief_description> @@ -185,8 +185,10 @@ <method name="quit"> <return type="void"> </return> + <argument index="0" name="exit_code" type="int" default="-1"> + </argument> <description> - Quits the application. + Quits the application. A process [code]exit_code[/code] can optionally be passed as an argument. If this argument is [code]0[/code] or greater, it will override the [member OS.exit_code] defined before quitting the application. </description> </method> <method name="reload_current_scene"> @@ -194,7 +196,7 @@ </return> <description> Reloads the currently active scene. - Returns an [enum Error] code as described in [method change_scene], with the addition of [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet. + Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated. </description> </method> <method name="set_auto_accept_quit"> @@ -204,6 +206,7 @@ </argument> <description> If [code]true[/code], the application automatically accepts quitting. Enabled by default. + For mobile platforms, see [method set_quit_on_go_back]. </description> </method> <method name="set_group"> @@ -248,6 +251,7 @@ </argument> <description> If [code]true[/code], the application quits automatically on going back (e.g. on Android). Enabled by default. + To handle 'Go Back' button when this option is disabled, use [constant MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST]. </description> </method> <method name="set_screen_stretch"> @@ -287,7 +291,7 @@ If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. </member> <member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false"> If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior: @@ -325,9 +329,9 @@ </description> </signal> <signal name="global_menu_action"> - <argument index="0" name="id" type="Nil"> + <argument index="0" name="id" type="Variant"> </argument> - <argument index="1" name="meta" type="Nil"> + <argument index="1" name="meta" type="Variant"> </argument> <description> Emitted whenever global menu item is clicked. |