diff options
Diffstat (limited to 'doc/classes/MainLoop.xml')
-rw-r--r-- | doc/classes/MainLoop.xml | 101 |
1 files changed, 8 insertions, 93 deletions
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index af71c30936..7bb478fce2 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -7,6 +7,7 @@ [MainLoop] is the abstract base class for a Godot project's game loop. It is inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree. Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation. Here is an example script implementing a simple [MainLoop]: + [b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring. [codeblock] extends MainLoop @@ -43,17 +44,6 @@ <tutorials> </tutorials> <methods> - <method name="_drop_files" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="files" type="PackedStringArray"> - </argument> - <argument index="1" name="from_screen" type="int"> - </argument> - <description> - Called when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated. - </description> - </method> <method name="_finalize" qualifiers="virtual"> <return type="void"> </return> @@ -61,17 +51,6 @@ Called before the program exits. </description> </method> - <method name="_global_menu_action" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="id" type="Variant"> - </argument> - <argument index="1" name="meta" type="Variant"> - </argument> - <description> - Called when the user performs an action in the system global menu (e.g. the Mac OS menu bar). - </description> - </method> <method name="_idle" qualifiers="virtual"> <return type="bool"> </return> @@ -89,24 +68,6 @@ Called once during initialization. </description> </method> - <method name="_input_event" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> - <description> - Called whenever an [InputEvent] is received by the main loop. - </description> - </method> - <method name="_input_text" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <description> - Deprecated callback, does not do anything. Use [method _input_event] to parse text input. Will be removed in Godot 4.0. - </description> - </method> <method name="_iteration" qualifiers="virtual"> <return type="bool"> </return> @@ -140,24 +101,6 @@ Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0. </description> </method> - <method name="input_event"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> - <description> - Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0. - </description> - </method> - <method name="input_text"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <description> - Should not be called manually, override [method _input_text] instead. Will be removed in Godot 4.0. - </description> - </method> <method name="iteration"> <return type="bool"> </return> @@ -180,58 +123,30 @@ </signal> </signals> <constants> - <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002"> - Notification received from the OS when the mouse enters the game window. - Implemented on desktop and web platforms. - </constant> - <constant name="NOTIFICATION_WM_MOUSE_EXIT" value="1003"> - Notification received from the OS when the mouse leaves the game window. - Implemented on desktop and web platforms. - </constant> - <constant name="NOTIFICATION_WM_FOCUS_IN" value="1004"> - Notification received from the OS when the game window is focused. - Implemented on all platforms. - </constant> - <constant name="NOTIFICATION_WM_FOCUS_OUT" value="1005"> - Notification received from the OS when the game window is unfocused. - Implemented on all platforms. - </constant> - <constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006"> - Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4). - Implemented on desktop platforms. - </constant> - <constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007"> - Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). - Specific to the Android platform. - </constant> - <constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008"> - Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus). - No supported platforms currently send this notification. - </constant> - <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009"> + <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009"> Notification received from the OS when the application is exceeding its allocated memory. Specific to the iOS platform. </constant> - <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010"> + <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="2010"> Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr]. </constant> - <constant name="NOTIFICATION_WM_ABOUT" value="1011"> + <constant name="NOTIFICATION_WM_ABOUT" value="2011"> Notification received from the OS when a request for "About" information is sent. Specific to the macOS platform. </constant> - <constant name="NOTIFICATION_CRASH" value="1012"> + <constant name="NOTIFICATION_CRASH" value="2012"> Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms if the crash handler is enabled. </constant> - <constant name="NOTIFICATION_OS_IME_UPDATE" value="1013"> + <constant name="NOTIFICATION_OS_IME_UPDATE" value="2013"> Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). Specific to the macOS platform. </constant> - <constant name="NOTIFICATION_APP_RESUMED" value="1014"> + <constant name="NOTIFICATION_APP_RESUMED" value="2014"> Notification received from the OS when the app is resumed. Specific to the Android platform. </constant> - <constant name="NOTIFICATION_APP_PAUSED" value="1015"> + <constant name="NOTIFICATION_APP_PAUSED" value="2015"> Notification received from the OS when the app is paused. Specific to the Android platform. </constant> |