Go back [Home]
This is the main system file which has to be imported "everywhere": In the App files and in the [MAIN] file.
It provides the basic functionalities of this system and the base application class where all Apps are derived from.
Internal used variables and functions are described at the end of this page.
The FULL path to the MAIN.py script and all other scripts provided here.
Used for saving and loading stuff from and to the userdata and appdata directories.
Needs a / at the end: HOME_PATH="/mypath/"
The internal name of the App to be called when an (other) App gets closed.
Use that function to register an instance of an App into the system.
appname is the (internal) name to be referenced to. Usually the file name without ".py"
appinstance is an instance to your App. Usually myAppFile.App() where myAppFile is the name of the file where your App resides.
If you want to RESTART an App completely, just use registerApplication again with a new instance of your App.
Switches to the App with the given appname or to a new BaseAppClass-instance if not found. It then shows the empty application screen.
Other names to call SetCurrentApp.
Initialize the system. Needs to be called in [MAIN] just before the main loop.
Updates the whole system (and the actual running App).
Call this inside the main loop. (See at the end of [MAIN])
Returns True when running and False when exiting the program.
Ends the program.
Call this at the very end of [MAIN].
The basic App class which provides the functions used by this system.
Derive your App-class from that class.
You may overwrite all of the functions except for the __initialize__ (with lower case - ) function.
See [APP_TEMPLATE] for further information.
This is just here for reference. DO NOT USE, itŝ already used by the system itself.
The pygame display surface used for drawing directly to the screen.
Passed to the update function of an App.
The array containing the Application instances with their internal names.
The current running App(-instance).
The time passed since the last frame in seconds
This variable is passed to the current running Apps update function, so you don't have to use it directly.
The time stamp of the frame previous to the last one.
Used to calculate deltaTime.
Called in APP_BASE.update after each frame. Counts the time passed since the last frame in seconds and sets it to APP_BASE.deltaTime.
Do you want to create your very own menu App? Because that is the next section: [APP_MENU]
Wiki: APP_MENU
Wiki: APP_TEMPLATE
Wiki: Home
Wiki: MAIN
Wiki: UITools