UI View
UI View
A screen authored in the editor, described without naming a rendering channel. The entry is a manifest rather than an artifact because it is written by an author, not generated by the plugin: an artifact would add suspended asset I/O and a persistence cycle where there is only configuration.
Campos
| Campo | Tipo | Padrão | Descrição | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viewId | String | — | Identifier used by open and close actions to address this view | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
layers | List<UiLayerConfig> | empty | Layers composing the view, from back to front
|
| Campo | Tipo | Padrão | Descrição | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
layerId | String | — | Layer identifier, unique inside the view | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
components | List<UiComponentConfig> | empty | Components of this layer
|
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
componentId | String | — | Component identifier, unique inside the layer |
binding | String | — | Placeholder this component takes its value from; leave empty for static content |
icon | String | — | Material whose picture is drawn before the text, for instance DIAMOND_SWORD |
background | String | — | Panel image painted behind this component instead of a flat colour, for instance slate |
capabilities | List<UiCapabilityOption> | empty | Hard requirements on the rendering channel; a channel that cannot serve one is excludedValores:INVENTORY_MANIPULATIONDEPTHTEXT_INPUT |
visibility | UiVisibilityConfig | — | Gating applied before the component is composed |
placement | UiPlacementConfig | — | Where the component sits |
palette | UiPaletteOption? | NONE | Tint from the shader palette; NONE is not drawnValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
hoverPalette | UiPaletteOption | NONE | Tint while the cursor rests on it; NONE keeps the idle tintValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
disabledPalette | UiPaletteOption | NONE | Tint while its criteria do not match; NONE keeps the idle tintValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
label | String | — | Shown while the cursor rests on it, beside the screenPlaceholdersCores |
text | String | — | Drawn across the component in the vanilla fontPlaceholders |
textPalette | UiPaletteOption | NONE | Tint of that text; NONE draws it whiteValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
textEffect | UiTextEffect | — | —Valores:NONEOUTLINE_FINESHINEGRADIENTGLOWPULSERELIEFBRUSHEDEMBERFROSTWAVERAINBOW |
textAlign | UiTextAlign? | LEFT | How that text sits inside the component |
tooltip | String | — | Shown at the view's tooltip anchor while the cursor rests here; one line per newlinePlaceholders |
criteria | List<Criteria> | empty | Conditions that must all hold for this component to answer a click |
onLeftClick | List<Ref<TriggerableEntry>> | empty | Triggered on left click |
onRightClick | List<Ref<TriggerableEntry>> | empty | Triggered on right click |
input | UiInputConfig? | — | Asks the player to type a value before the click takes effect |
navigateTo | String? | — | Node this button opens; leave empty for a button that does not navigate |
gauge | UiGaugeConfig? | — | Draws this component as a bar filled from a placeholder, instead of a flat cell |
backgroundBinding | String | — | Placeholder naming WHICH panel image to paint, for instance a level glyph; empty keeps the fixed one |
paletteBinding | String | — | Placeholder naming WHICH tint to draw this component in, for instance a health bar that turns to ice; empty keeps the fixed one |
backgroundSquare | Boolean | false | Keep the panel image square instead of filling the cell, which a wide screen would stretch |
textOffset | Int | 0 | Nudge the text sideways by this many interface pixels, to line up with what a cell cannot |
textHalfRowDown | Boolean | false | Draw the text half a row lower, so two lines sit closer than a whole cell apart |
textOffsetY | Int | 0 | Signed pixel nudge up or down, from where the text is centred; HUD modules only |
stack | String | — | Pile this joins: members share a row and slide apart, one cell per bar that has a value |
lineIcon | String | — | Material whose picture closes the line, drawn at text height; empty for none |
textBackdrop | UiPaletteOption | NONE | Tint laid behind the text, cut to the text's own width; NONE draws no backdropValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
image | String | — | Logical pack image fitted inside this component while preserving its aspect ratio |
imageBinding | String | — | Placeholder naming a logical pack image; empty keeps the fixed image |
visibilityUiVisibilityConfigUiVisibilityConfig (2)
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
permission | String | — | Permission required to see this element; leave empty for none |
conditions | List<UiConditionConfig> | empty | Fact comparisons that must all hold |
repeatsList<UiRepeatConfig>?UiRepeatConfig (11)
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
repeatId | String | — | Identifier of this list, unique inside the layer; also the key its offset is stored under |
source | String | — | Binding prefix; item 3 reads <source>.3 and its picture <source>.3.icon |
column | Int | 0 | Column the window starts at |
row | Int | 0 | Row the window starts at |
width | Int | 1 | Columns the window spans |
height | Int | 1 | Rows the window spans |
stepMode | UiStepMode | PAGE | PAGE turns a whole window per gesture, ITEM moves one itemValores:ITEMPAGE |
template | UiComponentConfig | — | What one item looks like; its id, binding and position are supplied per item |
selectable | Boolean? | — | Items answer a click; what the click does belongs to whoever provided the list |
itemWidth | Int? | — | Cells one item spans across; a name needs several, a map square wants one |
itemHeight | Int? | — | Cells one item spans down |
tooltipAnchorUiTooltipAnchorConfig?UiTooltipAnchorConfig (3)
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
column | Int | -1 | Column the tooltip starts at; leave negative to take the server default |
row | Int | -1 | Row the first line sits on; leave negative to take the server default |
panel | UiPaletteOption | SURFACE | Tint of the panel drawn behind it; NONE draws no panelValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
titleAnchorUiTooltipAnchorConfig?UiTooltipAnchorConfig (3)
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
column | Int | -1 | Column the tooltip starts at; leave negative to take the server default |
row | Int | -1 | Row the first line sits on; leave negative to take the server default |
panel | UiPaletteOption | SURFACE | Tint of the panel drawn behind it; NONE draws no panelValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
soundsUiSoundsConfig?UiSoundsConfig (3)
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
onOpen | Sound? | — | Played when the view opens |
onClose | Sound? | — | Played when the view closes |
onClick | Sound? | — | Played when a component answers a click, and when a page turns |
nodesList<UiViewNodeConfig>?UiViewNodeConfig (4)
| Campo | Tipo | Padrão | Descrição | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nodeId | String | — | Node identifier, unique inside the view | ||||||||||||
parentId | String | — | Node this one sits inside; leave empty for a root | ||||||||||||
title | String | — | Shown in the breadcrumb; leave empty to keep the node out of the trailPlaceholdersCores | ||||||||||||
regions | List<UiRegionFillConfig>? | — | Which layer fills which region while this node is active
|
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
regionId | String | — | Name of the region, for instance content or actions |
layerId | String | — | Layer drawn there; a layer named here becomes a panel instead of part of the frame |
rootNodeIdString?statesList<UiStateConfig>?UiStateConfig (5)
| Campo | Tipo | Padrão | Descrição | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stateId | String | — | State identifier, unique inside the view | ||||||||||||||||||||||||||||||||||||||||
priority | Int | 0 | Higher wins when several states hold at once | ||||||||||||||||||||||||||||||||||||||||
parentId | String | — | State this one refines; it inherits every override the parent does not restate | ||||||||||||||||||||||||||||||||||||||||
conditions | List<UiStateConditionConfig> | empty | Conditions that must all hold for this state to be the active one; leave empty for a default
|
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
kind | UiStateConditionKind | FACT | FACT compares a fact, PERMISSION checks the player holds a nodeValores:FACTPERMISSION |
fact | String | — | Fact name; an unwritten fact reads as zero |
comparison | UiComparison | EQUALS | How the fact is compared to the thresholdValores:EQUALSNOT_EQUALSLESS_THANGREATER_THANAT_MOSTAT_LEAST |
threshold | Int | 0 | Value the fact is compared against |
permission | String | — | Permission node the player must hold |
overridesList<UiStateOverrideConfig>emptyUiStateOverrideConfig (9)
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
target | String | — | Component this applies to: its id, or column:row to address the cell it sits on |
visible | UiStateVisibilityOption | INHERIT | Whether the component is drawn at all while this state holdsValores:INHERITSHOWNHIDDEN |
palette | UiPaletteOption | NONE | Tint while this state holds; NONE keeps the component's ownValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
hoverPalette | UiPaletteOption | NONE | Tint under the cursor while this state holds; NONE keeps the component's ownValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET |
text | String | — | Text drawn across it; leave empty to keep its ownPlaceholders |
label | String | — | Shown beside the screen under the cursor; leave empty to keep its ownPlaceholdersCores |
tooltip | String | — | Shown at the tooltip anchor under the cursor; leave empty to keep its ownPlaceholders |
icon | String | — | Material whose picture is drawn; leave empty to keep its own |
background | String | — | Panel image painted behind it; leave empty to keep its own |
openingUiArrival?openingMillisInt?openingFadeBoolean?How to use it
One entry is one view (or one menu with several screens). viewId is what the open action, the /ui open command and the item triggers refer to: it must be unique and is case-sensitive.
- Add a layer for each depth you need (a backdrop, the content, an overlay). Layers are drawn back to front.
- Add components with
placement.kindCELL. The grid is 15 by 15, with column 0 and row 0 at the top left. Give interactive components enough cells to aim at. - Paint with
palette(a named tint) orbackground(a panel image of the pack, drawn with nine slices so corners stay sharp at any size). SethoverPaletteso the player sees what the cursor is on. - Put what a click does in
onLeftClickandonRightClick; addcriteriaso the component answers only when its conditions hold, anddisabledPaletteto show that it does not. - For several screens, declare
nodes(tabs and sub-screens) and give a buttonnavigateTowith a node id.rootNodeIdis the screen shown first. - For lists driven by data, add a
repeatswindow with asourceprefix; itstemplateis one item and receives its binding and position. - Use
statesfor a view that changes with the world: a state holdsconditions(a fact compared to athreshold, or a permission) andoverridestargeting components by id orcolumn:row. A state with no condition is the default.
tooltipAnchor and titleAnchor place the tooltip and title when you do not want the server defaults of UI Configuration. Negative coordinates take the default. A component whose placement.kind is NONE is not drawn, and a MINIMAP placement draws nothing in a menu: the map is a HUD element.