Class ApplicationBase
source code
builtins.object --+
|
ApplicationBase
ApplicationBase is an extendable class that provides a basic
environment for a FIFE-based client. This kind of application base does
not offer GUI support.
The unextended application reads in and initializes engine settings,
sets up a simple event listener, and pumps the engine while listening for
a quit message. Specialized applications can modify settings.py to change
initial engine settings. They can provide their own event listener by
overriding createListener. And they can override the _pump method to define runtime
behavior of the application.
|
|
|
|
|
initLogging(self)
Initialize the LogManager. |
source code
|
|
|
createListener(self)
This creates a default event listener, which will just close the
program after pressing ESC. |
source code
|
|
|
run(self)
Initialize the event listener and event loop - and start it. |
source code
|
|
|
|
|
|
|
|
|
|
Load the settings from a python file and load them into the engine.
Called in the ApplicationBase constructor.
|
This creates a default event listener, which will just close the
program after pressing ESC.
You should override this method to provide your own event
handling.
|
The programs main loop.
Do not override this, instead provide your own _pump method. You can call
this recursively, e.g. to provide synchronous Dialogs :-) and break out
of the current mainLoop by calling breakFromMainLoop. It will return the argument passed to
breakFromMainLoop.
|
Break from the currently running mainLoop.
The passed argument will be returned by the mainLoop.
|
Application pump.
Derived classes can specialize this for unique behavior. This is
called every frame.
|
Quit the application. Really!
|