Back to [APK_DOTNET_MAUI]
This interface is the main entrypoint for your applications in this framework.
Derive your App from this interface and overwrite some functions and other members to make it run.
Then set cGame.actualGame to an instance of your class or add it to the app list.
(An App selection menu is not yet contained in this framework. But it's planned to do something about it later.)
Create a constructor to add your App to the app list in cAppLauncher, else it may not work.
Called once when switching from the Launcher or somewhere else to this app.
This is a "constructor" which is called every time when the App comes into foreground.
e.g. Create the main menu of your App here, so that it will overwrite the Launcher-Mainmenu, for instance.
Draw the contents of your App here. This will only be called when something changes.
Most of the functions in [GFX] can ONLY be used here.
WARNING: Drawing only happens at startup and when one clicks on the canvas, not continuously.
This will be called when one clicks on the canvas.
Put here your game logic for turn based games based on the click position.
[GUI] items (except for raw buttons) will be catched in cGame and do NOT need to be handled here.
Only raw buttons need to be handled here (CGUIButton OUTSIDE of CGUIMessageBox-es)
This is the "event handler" for all [GUI] operations.
You can provide a funcNumber and funcValue to each of your [GUI]-items.
When clicked, the GUI will call your IGame.onGUI() with the provided funcNumber and funcValue.
Use funcNumber and funcValue for your own logic here.
e.g. in GAMES/cChessGame.cs there is an enum providing all funcNumbers. Some also need a funcValue but mostly it is = -1 and not used.
WARNING: Raw CGUIButton-instances (created directly in your App) do NOT call onGUI() and are NOT handled in cGame (in opposite to the other GUI-elements), except they are added to a CGUIMessageBox.
Handle them directly in your onClick() function, using CGUIButton.isMouseOver().