Back to [APK_DOTNET_MAUI].
Classes and functions for creating the GUI (Graphical User Interface)
General functions for accessing and using the GUI. All functions are static.
Shows the given message box box.
Hides/removes the actually shown message box.
Shows the menu menu at its position given by its eMainMenuAlignement and posidx values.
Hides the actually shown menu.
Sets a CGUIMainMenuButton to the given corner align and button position index posidx, showing txt and returning funcNum and funcVal to IGame.onGUI()when clicked. If that position is already taken, it will be overwritten.
Removes all CGUIMainMenuButtons from the GUI.
A text drawn at the center of the screen.
Used with CGUIMessageBox.addText().
You need to handle it yourself (call Draw() in IGame.onDraw()) if not used with CGUIMessageBox.
Creates the text using txt in color colr, positioned at setx, sety seen from the center of the screen.
Draws the text. Used automagically in CGUIMessageBox, else you need to call it yourself.
A button drawn at the center of the screen.
Used with CGUIMessageBox.addButton().
You need to handle it yourself (call Draw() and isMouseOver() in IGame.onDraw() and IGame.onClick()) if not used with CGUIMessageBox.
Creates the button with the function number funcnum, the function value funcval (received in IGame.onGUI()), the display text txt at position vx, vy seen from center of the screen with width w and height h (defaulting to 200, 50).
You need to handle the button by yourself if not used with a CGUIMessageBox. It will NOT call IGame.onGUI() outside of a CGUIMessageBox, you need to do that also by yourself.
Sets the colors of the button and it's text to front and back. Used by CGUIMessageBox.setColors() for already registered buttons and texts.
Returns true if mousex, mousey is placed in the buttons rectangle, seen from center of the screen.
Draws the button, seen from center of the screen.
Message Boxes are drawn over all other GUI elements and need to be responded to get hidden.
There can only be ONE message box shown at a time.
The actually visible message box. Only one message box can be shown at a time, and this is the handle to it.
Null if no message box is shown.
Creates a the messagebox.
The messagebox will be hidden after a click somewhere on the screen, if there are NO buttons in the message box.
Else it will be hidden after a click on one of the buttons.
funcnum and funcval are used in IGame.onGUI() after a click on the box, if there are NO buttons in the messagebox.
Use addText and addButton to create text and buttons of the messagebox.
Sets the colors of this message box, and all of its texts and buttons.
Returns a list with all registered buttons for this message box. The list consists of CGUIButtons.
Adds a text to the messagebox at setx, sety seen from the center of the screen. If col is null, it will take the message box front color.
Creates and adds a CGUIButton to the message box, with the function number funcnum, function value funcval (received in IGame.onGUI()) atx, y (seen from center of the screen) with the width w and height h and colors front and back (set to the message box colors if null).
Adds the button btn to the message box.
Draws the message box. You don't need to use this, just set the actualBox with GUI.showMessagebox().
Defines in which corner of the screen a main menu button or a menu is positioned.
The first position is taken if the screen height is bigger than the screen width (mobile phone), the second position is taken when the screen width is bigger than the screen height (tablet).
Members are: TOPLEFT_OR_LEFTTOP, TOPRIGHT_OR_LEFTBOTTOM, BOTTOMLEFT_OR_RIGHTTOP, BOTTOMRIGHT_OR_RIGHTBOTTOM
A button which is positioned in one of the corners (+ positionidx) of the screen.
Create and add them to the GUI with GUI.addMainMenuItem().
The buttons will be handled by the engine then. Use IGame.onGUI() to handle them in your App.
More about them at GUI.addMainMenuItem().
A menu aligned to a specific CGUIMainMenuButton (respective its alignement and posidx), consisting of CGUIMenuItems.
There can be only one menu visible at a time.
The actually shown menu. Set it with GUI.showMenu().
The list with all menu entries of that menu.
Creates the menu aligned to the screen corner align at button position posidx with the width width and height itmheight of one item.
Adds an item with the text text, which returns funcnum and funcval to IGame.onGUI() when clicked - and returns it.
Removes all the items of this menu.
...you don't need to know about the rest of it.
A menu item which is created with CGUIMenu.addItem()