Apos.Gui

UI library for MonoGame.

Description

This library is designed to allow the creation of custom user facing UIs. It doesn’t provide much out of the box except some mechanics to manage user inputs, focus handling, component parenting and hierarchy. It is inspired by the IMGUI paradigm.

Discord

Documentation

Build

NuGetNuGet

Features

  • Mouse, Keyboard, Gamepad (touch input is possible but not provided out of the box)
  • UI scaling
  • Used like IMGUI but components can be coded like a retained UI

Showcase

Apos.GUI Showcase

Usage Example

You can create a simple UI with the following code that you’ll put in the Update call:

MenuPanel.Push();
if (Button.Put("Show fun").Clicked) {
    _showFun = !_showFun;
}
if (_showFun) {
    Label.Put("This is fun!");
}
if (Button.Put("Quit").Clicked) {
    Exit();
}
MenuPanel.Pop();

This code will create 2 buttons, “Show Fun” and “Quit”. You can use your mouse, keyboard, or gamepad to interact with them. Clicking on “Show Fun” will insert a label in between them with the text “This is fun!”.

You can read more in the Getting started guide.

Other projects you might like

Edit this page on GitHub