Add a shorthand for setting the exit code using SceneTree::quit()
This reduces the amount of code required to exit a process with a non-zero exit code. This pattern is also found in most other programming languages.
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user