Every user interface in OpenMenuOS is built from screens. A screen is the fundamental unit of display: it knows how to draw itself and how to respond to user input. OpenMenuOS ships three concrete screen types, each suited to a different purpose, all of which inherit from the abstractDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/The-Young-Maker/OpenMenuOS/llms.txt
Use this file to discover all available pages before exploring further.
Screen base class. The ScreenManager keeps track of which screen is active and maintains a history stack so users can navigate forward and back through the interface.
The Screen base class
All screen types derive from Screen, which defines two pure-virtual methods every subclass must implement:
draw()— renders the screen onto the TFT canvashandleInput()— processes button or encoder events for the current frame
ScreenConfig& config that controls appearance across the entire menu system.
The three screen types
MenuScreen
A scrollable list of labelled items. Each item can link to another screen, trigger a callback, or display an icon. Use this as the primary navigation surface.
SettingsScreen
A structured list of configurable settings — boolean toggles, numeric ranges, option lists, and links to sub-screens. Values are automatically persisted to EEPROM or Preferences.
CustomScreen
A blank canvas with a
customDraw function pointer. Assign any std::function<void()> to draw arbitrary graphics, sensor readouts, or status pages.MenuScreen
MenuScreen is the workhorse of most interfaces. It renders a vertically scrollable list and handles navigation to linked screens or invokes an ActionCallback when the user selects an item.
addItem(). The overload that accepts a Screen* without a label uses the target screen’s own title automatically:
SettingsScreen
SettingsScreen presents typed settings and persists their values automatically. Each setting is added via a dedicated helper method.
SettingsScreen enforces a maximum of MAX_ITEMS = 10 settings per screen. Use addSubscreenSetting() to link to a secondary SettingsScreen when you need more.CustomScreen
CustomScreen gives you complete control over what is drawn. Assign a lambda or function to customDraw; it is called every time the screen needs to render.
canvas sprite (a TFT_eSprite), which is then flushed to the display by the library after draw() returns.
ScreenManager
TheScreenManager class owns the navigation stack. You typically do not interact with it directly — OpenMenuOS wraps its interface — but understanding it helps when using redirectToScreen() and navigateBack().
pushScreen() saves the currently active screen to screenHistory before activating the new one, and popScreen() restores it. The global currentScreen pointer always points to the active screen.
Choosing the right screen type
| Scenario | Screen type |
|---|---|
| Top-level navigation hub | MenuScreen |
| Sub-menu or category list | MenuScreen |
| User-configurable options | SettingsScreen |
| Dashboard, sensor readout, or about page | CustomScreen |
| Any screen requiring free-form graphics | CustomScreen |