Menu

APK_DOTNET_MAUI

Benedict Jäggi

APK_DOTNET_MAUI-Project

Please read the README.md file in the project folder.

This is the Android based version of this App-collection.
It's made with Microsoft Visual Studio 2022 using .NET MAUI with C#.
You can run it as Windows App for debugging and then port it to an Android APK as described here.

You may learn here, how to create a GraphicsView for drawing on the screen and how to draw on it, how to get mouse clicks and how to create class instances from strings in a list and maybe more.

Unlike Microsoft Learn, where most stuff (like Buttons, Labels, etc.) is created in XAML, here all graphics are made in C# except for the absolutely needed XAML stuff like the definition of the GraphicsView.

Stuff for you:

[IGame]: (in cGame.cs) Derive your App-class from this Interface. This is your entry point.
Libraries/[GFX]: The graphics drawing functions are all located in this file. Most of them can only be used in the IGame.onDraw function respective the function that calls IGame.onDraw.
Libraries/[GUI]: GUI elements to create and use in your IGame class, like Message Boxes, Buttons, the Main Menu and drop-down menus for it.
Libraries/[FOPS]: File OPerationS. Use the content of this file for file operations like creating files and directories and checking for their existence and such.
[Globals] Some stuff which may be used in several different apps/games.

Background engine stuff:

[cGame]: This is the "engine" itself. Here all will be drawn and mouse clicks will be catched and checked for clicks on buttons, menu entries, etc.
Drawables/GameDrawable: The class used by/linked to the .NET MAUI Graphicsview. Just calls GFX.initializeValues and cGame.onDraw() when drawing.


Related

Wiki: FOPS
Wiki: GFX
Wiki: GUI
Wiki: Globals
Wiki: Home
Wiki: IGame