Pular para o conteúdo principal

UI View

A screen: layers of components on a 15 × 15 grid, drawn in GUI space and therefore identical for every player whatever their GUI scale, field of view or aspect ratio.

Configuration

FieldWhat it does
viewIdThe identifier actions, commands and items use to open this view.
layersThe layers, drawn back to front.
nodesScreens of this menu: tabs and sub-menus. Leave empty for a single screen.
rootNodeIdWhich node the menu opens on. Empty opens the first declared one.
tooltipAnchor / titleAnchorWhere explanations and the breadcrumb sit. Negative coordinates inherit the server default.
soundsPlayed on open, on close and on a click.
statesWhat components become while a condition holds.
opening / openingMillis / openingFadeHow the view arrives.

Components

FieldWhat it does
componentIdUnique inside its layer. Also how a state addresses it.
placementCELL on the grid, MARKER anywhere in the viewport, SCRIM a full-screen veil, NONE not drawn.
palette / hoverPalette / disabledPaletteTints. NONE keeps the previous one.
backgroundA panel image painted behind it instead of a flat tint.
iconA material whose picture is drawn, for instance DIAMOND_SWORD.
text / textPalette / textAlignDrawn across the component.
label / tooltipShown beside the screen while the cursor rests on it.
bindingA placeholder this component takes its value from.
criteriaWhat must hold for a click to be answered.
onLeftClick / onRightClickWhat a click triggers.
navigateToThe node this button opens.
inputAsk the player to type a value before the click takes effect.

A component answers a click only when something is wired to one. Navigating counts: a tab that only changes screen is a button, and drawing it as decoration would leave the cursor sliding over it as though it were part of the frame.

Tints

A cell's glyph colour carries its column, its row and its tint, so a tint is an index into a fixed palette rather than a free value:

FRAME SURFACE SURFACE_LIGHT MUTED
BLUE BLUE_LIGHT CYAN TEAL
GREEN GREEN_LIGHT YELLOW ORANGE
RED_DARK RED PURPLE WHITE
BLACK INK SLATE STEEL STEEL_LIGHT MIST PAPER
FOREST MINT GOLD AMBER WINE CORAL VIOLET

NONE means not drawn, which is how an empty cell stays transparent — it is not another colour.

[!NOTE] Text reaches only the first sixteen tints. A text glyph's colour is spent on its position and its width, so its tint comes from its font, and the pack ships sixteen text fonts. A text tint past the sixteenth falls back to white — legible and in the right place — rather than drawing in the wrong place.

Panels and pictures

background names a picture rather than a texture path: the pack owns which image that name draws, so retexturing never touches a page.

A picture is painted per cell. A button three cells wide repeats its image three times unless the pack supplies the nine pieces of a panel — four corners, four edges, a centre — which is how a panel of any size is composed without stretching its corners.

Any number of pictures share one font, so adding images costs nothing in the renderer's budget.

Lists

A repeat is a window over a numbered source. Item 3 reads <source>.3, and its picture <source>.3.icon. The template is an ordinary component: what an item looks like is authored exactly like any other cell, and only its id, its binding and its position are supplied per item.

stepMode decides whether a gesture turns a whole window (PAGE) or moves one item (ITEM).

States

A state gives components a different look while a condition holds.

FieldWhat it does
stateIdUnique inside the view.
priorityHigher wins when several hold at once.
parentIdThe state this one refines. It inherits every override the parent does not restate.
conditionsFacts and permissions that must all hold. Leave empty for a default.
overridesWhat components become.

An override addresses a component by its id, or by column:row to address the cell it sits on — which is how a state written against a chest layout applies here unchanged. An id wins over a coordinate.

Every override field means KEEP when left empty, except visible, which is the one field that can subtract. A component a state hides is removed, not merely tinted away: leaving it in place would keep it under the cursor and let it answer a click nobody can aim at.

States are re-evaluated on every repaint, so a view changes while it is open.

Arrival

FieldWhat it does
openingNONE, WIPE_DOWN, WIPE_UP, WIPE_RIGHT, WIPE_LEFT, BLOOM, FADE.
openingMillisHow long it takes. Zero shows the view at once.
openingFadeCells come up from transparent instead of appearing at once.

BLOOM opens outwards from the middle of the screen, which suits a menu opening under the player's own cursor — the middle is where they are already looking.

The animation plays only when entering the interface. Moving between tabs, or opening a second view from a button, shows none: what charms once annoys the tenth time.

[!NOTE] Nothing slides. A cell's address is a whole number of columns and rows, so an arrival reveals cells in an order. A smooth glide is not something the grid can express, and offering one would deliver a stutter.