Skip to main content

Module types

Module types 

Source

Structs§

BorderParams
BracketParams
A partial box border (left/right/top/bottom edges) drawn at the element’s rect, 1px lines — the original “bracket” decoration used on stats pages.
ColumnDef
CursorParams
A selection cursor (e.g. the ▶ arrow). Its base position is the element’s rect.tx/rect.ty; the final position is base + col*col_step (x) and base + row*row_step (y), so a single cursor expresses a 1-D list, a 2-D grid (battle FIGHT/PKMN/ITEM/RUN), or an enum-offset selector. col/row are data bindings; place several cursor elements for multi-cursor screens (options/party).
DataContext
DividerParams
EdgeInsets
ElementRect
FlexListParams
GroupParams
ImageData
A decoded full-colour image: straight RGBA, row-major (width * height). The image layout element looks one up by its resolved source key in the ImageRegistry carried on RenderContext.
ImageParams
ItemTemplate
LayoutConfig
LayoutElement
ListCursor
Cursor configuration for a scrollable list. Authored either as a bare tile id number ("cursor": 223) or as an object ("cursor": {"tile": 223, "position": "left"}).
ListParams
PixelRectParams
A raw filled rectangle in PIXEL coordinates (not tiles).
RenderContext
ScreenLayout
TextParams
Theme
TileParams

Enums§

BorderStyle
Coord
A coordinate value that can be either a literal u32 or a template variable string (e.g. "{cursor_0_tx}") that must be resolved at render time via DataContext.
DataValue
Direction
ElementParams
LocalizedValue
A text value that is either a single string (same in every language) or a per-locale map produced by the GUI DSL’s @t("en", "中文") literal — {"en": "TEXT SPEED", "zh": "文字速度"}. The renderer resolves it against the active language via LocalizedValue::get.
RenderError
TextAlign
TextMode
Text positioning strategy for a screen (see Theme::text_mode).
Visibility
Whether an element should render. Either a static bool or a {template} condition (e.g. "{show_entry}") evaluated against the DataContext at render time (truthy → visible).

Functions§

empty_image_registry
A shared empty image registry — the default RenderContext::images for callers that render no images (so RenderContext::new stays 4-arg).

Type Aliases§

FontRegistry
ImageRegistry
Named registry of full-colour images, looked up by an image element’s resolved source key. Empty by default (see empty_image_registry).
TilesetRegistry