Skip to main content

Module ui

Module ui 

Source
Expand description

Fantasy-console UI primitives.

Everything the shell and editors draw — panels, tab icons, the mouse cursor, selections — goes through these helpers into the same 128x128 framebuffer carts use. There are deliberately no native-looking widgets here: this is console chrome, not a GUI toolkit.

Constants§

ICON_CODE
R: the code editor.
ICON_MAP
Tile grid: the map editor.
ICON_MUSIC
Note: the music editor.
ICON_SFX
Speaker: the SFX editor.
ICON_SPRITE
A crab: the sprite editor.

Functions§

cursor
Draw the mouse cursor at a framebuffer position.
error_screen
The console’s friendly runtime-error screen, shared by every frontend (desktop, web, handheld) so a crashed cart looks the same everywhere.
icon
Draw an icon in one color (bits set = pixels drawn).
panel
Filled panel with a 1px border, inclusive corners.
selection
Invert-style selection: repaint a rectangle’s pixels with swapped foreground/background, used for text selections and highlights.
shadow_text
Text with a 1px drop shadow, for headers on busy backgrounds.

Type Aliases§

Icon
8x8 single-color icons for the editor tab bar, one bit per pixel. Order matches TAB_ICONS’ documentation: code, sprite, map, sfx, music.