MainLoop

Inherits: Object

Inherited By: SceneTree

Category: Core

Brief Description

Main loop is the abstract main loop base class.

Methods

void _drop_files ( PoolStringArray files, int screen ) virtual
void _finalize ( ) virtual
void _idle ( float delta ) virtual
void _initialize ( ) virtual
void _input_event ( InputEvent event ) virtual
void _input_text ( String text ) virtual
void _iteration ( float delta ) virtual
void finish ( )
bool idle ( float delta )
void init ( )
void input_event ( InputEvent event )
void input_text ( String text )
bool iteration ( float delta )

Constants

  • NOTIFICATION_WM_MOUSE_ENTER = 1002
  • NOTIFICATION_WM_MOUSE_EXIT = 1003
  • NOTIFICATION_WM_FOCUS_IN = 1004
  • NOTIFICATION_WM_FOCUS_OUT = 1005
  • NOTIFICATION_WM_QUIT_REQUEST = 1006
  • NOTIFICATION_WM_GO_BACK_REQUEST = 1007
  • NOTIFICATION_WM_UNFOCUS_REQUEST = 1008
  • NOTIFICATION_OS_MEMORY_WARNING = 1009
  • NOTIFICATION_TRANSLATION_CHANGED = 1010
  • NOTIFICATION_WM_ABOUT = 1011
  • NOTIFICATION_CRASH = 1012
  • NOTIFICATION_OS_IME_UPDATE = 1013

Description

Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a MainLoop has to be provided to OS, else the application will exit. This happens automatically (and a SceneTree is created), unless a main Script is supplied, which may or not create and return a MainLoop.

Method Descriptions

  • void _finalize ( ) virtual

Called before the program exits.

  • void _idle ( float delta ) virtual

Called each idle frame with time since last call as an only argument.

  • void _initialize ( ) virtual

Called once during initialization.

  • void _input_text ( String text ) virtual
  • void _iteration ( float delta ) virtual
  • void finish ( )
  • void init ( )
  • void input_text ( String text )