Zum Hauptinhalt springen

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.

Felder

FeldTypStandardBeschreibung
viewIdString—Identifier used by open and close actions to address this view
layersList<UiLayerConfig>emptyLayers composing the view, from back to front
UiLayerConfig (4)
FeldTypStandardBeschreibung
layerIdString—Layer identifier, unique inside the view
componentsList<UiComponentConfig>emptyComponents of this layer
UiComponentConfig (33)
FeldTypStandardBeschreibung
componentIdString—Component identifier, unique inside the layer
bindingString—Placeholder this component takes its value from; leave empty for static content
iconString—Material whose picture is drawn before the text, for instance DIAMOND_SWORD
backgroundString—Panel image painted behind this component instead of a flat colour, for instance slate
capabilitiesList<UiCapabilityOption>emptyHard requirements on the rendering channel; a channel that cannot serve one is excludedWerte:INVENTORY_MANIPULATIONDEPTHTEXT_INPUT
visibilityUiVisibilityConfig—Gating applied before the component is composed
placementUiPlacementConfig—Where the component sits
paletteUiPaletteOption?NONETint from the shader palette; NONE is not drawnWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
hoverPaletteUiPaletteOptionNONETint while the cursor rests on it; NONE keeps the idle tintWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
disabledPaletteUiPaletteOptionNONETint while its criteria do not match; NONE keeps the idle tintWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
labelString—Shown while the cursor rests on it, beside the screenPlatzhalterFarben
textString—Drawn across the component in the vanilla fontPlatzhalter
textPaletteUiPaletteOptionNONETint of that text; NONE draws it whiteWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
textEffectUiTextEffect——Werte:NONEOUTLINE_FINESHINEGRADIENTGLOWPULSERELIEFBRUSHEDEMBERFROSTWAVERAINBOW
textAlignUiTextAlign?LEFTHow that text sits inside the component
tooltipString—Shown at the view's tooltip anchor while the cursor rests here; one line per newlinePlatzhalter
criteriaList<Criteria>emptyConditions that must all hold for this component to answer a click
onLeftClickList<Ref<TriggerableEntry>>emptyTriggered on left click
onRightClickList<Ref<TriggerableEntry>>emptyTriggered on right click
inputUiInputConfig?—Asks the player to type a value before the click takes effect
navigateToString?—Node this button opens; leave empty for a button that does not navigate
gaugeUiGaugeConfig?—Draws this component as a bar filled from a placeholder, instead of a flat cell
backgroundBindingString—Placeholder naming WHICH panel image to paint, for instance a level glyph; empty keeps the fixed one
paletteBindingString—Placeholder naming WHICH tint to draw this component in, for instance a health bar that turns to ice; empty keeps the fixed one
backgroundSquareBooleanfalseKeep the panel image square instead of filling the cell, which a wide screen would stretch
textOffsetInt0Nudge the text sideways by this many interface pixels, to line up with what a cell cannot
textHalfRowDownBooleanfalseDraw the text half a row lower, so two lines sit closer than a whole cell apart
textOffsetYInt0Signed pixel nudge up or down, from where the text is centred; HUD modules only
stackString—Pile this joins: members share a row and slide apart, one cell per bar that has a value
lineIconString—Material whose picture closes the line, drawn at text height; empty for none
textBackdropUiPaletteOptionNONETint laid behind the text, cut to the text's own width; NONE draws no backdropWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
imageString—Logical pack image fitted inside this component while preserving its aspect ratio
imageBindingString—Placeholder naming a logical pack image; empty keeps the fixed image
visibilityUiVisibilityConfig—Gating applied before the layer is composed
UiVisibilityConfig (2)
FeldTypStandardBeschreibung
permissionString—Permission required to see this element; leave empty for none
conditionsList<UiConditionConfig>emptyFact comparisons that must all hold
repeatsList<UiRepeatConfig>?—Windows over numbered sources: lists, pages and scrolling
UiRepeatConfig (11)
FeldTypStandardBeschreibung
repeatIdString—Identifier of this list, unique inside the layer; also the key its offset is stored under
sourceString—Binding prefix; item 3 reads <source>.3 and its picture <source>.3.icon
columnInt0Column the window starts at
rowInt0Row the window starts at
widthInt1Columns the window spans
heightInt1Rows the window spans
stepModeUiStepModePAGEPAGE turns a whole window per gesture, ITEM moves one itemWerte:ITEMPAGE
templateUiComponentConfig—What one item looks like; its id, binding and position are supplied per item
selectableBoolean?—Items answer a click; what the click does belongs to whoever provided the list
itemWidthInt?—Cells one item spans across; a name needs several, a map square wants one
itemHeightInt?—Cells one item spans down
tooltipAnchorUiTooltipAnchorConfig?—Where this view puts its tooltips; negative coordinates take the server default
UiTooltipAnchorConfig (3)
FeldTypStandardBeschreibung
columnInt-1Column the tooltip starts at; leave negative to take the server default
rowInt-1Row the first line sits on; leave negative to take the server default
panelUiPaletteOptionSURFACETint of the panel drawn behind it; NONE draws no panelWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
titleAnchorUiTooltipAnchorConfig?—Where this view puts its title and breadcrumb; negative coordinates take the server default
UiTooltipAnchorConfig (3)
FeldTypStandardBeschreibung
columnInt-1Column the tooltip starts at; leave negative to take the server default
rowInt-1Row the first line sits on; leave negative to take the server default
panelUiPaletteOptionSURFACETint of the panel drawn behind it; NONE draws no panelWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
soundsUiSoundsConfig?—Sounds this view plays as it opens, closes and answers a click
UiSoundsConfig (3)
FeldTypStandardBeschreibung
onOpenSound?—Played when the view opens
onCloseSound?—Played when the view closes
onClickSound?—Played when a component answers a click, and when a page turns
nodesList<UiViewNodeConfig>?—Screens of this menu: tabs and sub-menus. Leave empty for a menu with a single screen
UiViewNodeConfig (4)
FeldTypStandardBeschreibung
nodeIdString—Node identifier, unique inside the view
parentIdString—Node this one sits inside; leave empty for a root
titleString—Shown in the breadcrumb; leave empty to keep the node out of the trailPlatzhalterFarben
regionsList<UiRegionFillConfig>?—Which layer fills which region while this node is active
UiRegionFillConfig (2)
FeldTypStandardBeschreibung
regionIdString—Name of the region, for instance content or actions
layerIdString—Layer drawn there; a layer named here becomes a panel instead of part of the frame
rootNodeIdString?—Node the menu opens on; leave empty to open on the first declared one
statesList<UiStateConfig>?—States of this view: what its components become while a condition holds
UiStateConfig (5)
FeldTypStandardBeschreibung
stateIdString—State identifier, unique inside the view
priorityInt0Higher wins when several states hold at once
parentIdString—State this one refines; it inherits every override the parent does not restate
conditionsList<UiStateConditionConfig>emptyConditions that must all hold for this state to be the active one; leave empty for a default
UiStateConditionConfig (5)
FeldTypStandardBeschreibung
kindUiStateConditionKindFACTFACT compares a fact, PERMISSION checks the player holds a nodeWerte:FACTPERMISSION
factString—Fact name; an unwritten fact reads as zero
comparisonUiComparisonEQUALSHow the fact is compared to the thresholdWerte:EQUALSNOT_EQUALSLESS_THANGREATER_THANAT_MOSTAT_LEAST
thresholdInt0Value the fact is compared against
permissionString—Permission node the player must hold
overridesList<UiStateOverrideConfig>emptyWhat components become while this state holds
UiStateOverrideConfig (9)
FeldTypStandardBeschreibung
targetString—Component this applies to: its id, or column:row to address the cell it sits on
visibleUiStateVisibilityOptionINHERITWhether the component is drawn at all while this state holdsWerte:INHERITSHOWNHIDDEN
paletteUiPaletteOptionNONETint while this state holds; NONE keeps the component's ownWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
hoverPaletteUiPaletteOptionNONETint under the cursor while this state holds; NONE keeps the component's ownWerte:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
textString—Text drawn across it; leave empty to keep its ownPlatzhalter
labelString—Shown beside the screen under the cursor; leave empty to keep its ownPlatzhalterFarben
tooltipString—Shown at the tooltip anchor under the cursor; leave empty to keep its ownPlatzhalter
iconString—Material whose picture is drawn; leave empty to keep its own
backgroundString—Panel image painted behind it; leave empty to keep its own
openingUiArrival?—How this view arrives when it opens
openingMillisInt?—How long that arrival takes, in milliseconds; zero shows the view at once
openingFadeBoolean?—Cells come up from transparent instead of appearing at once

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.

  1. Add a layer for each depth you need (a backdrop, the content, an overlay). Layers are drawn back to front.
  2. Add components with placement.kind CELL. The grid is 15 by 15, with column 0 and row 0 at the top left. Give interactive components enough cells to aim at.
  3. Paint with palette (a named tint) or background (a panel image of the pack, drawn with nine slices so corners stay sharp at any size). Set hoverPalette so the player sees what the cursor is on.
  4. Put what a click does in onLeftClick and onRightClick; add criteria so the component answers only when its conditions hold, and disabledPalette to show that it does not.
  5. For several screens, declare nodes (tabs and sub-screens) and give a button navigateTo with a node id. rootNodeId is the screen shown first.
  6. For lists driven by data, add a repeats window with a source prefix; its template is one item and receives its binding and position.
  7. Use states for a view that changes with the world: a state holds conditions (a fact compared to a threshold, or a permission) and overrides targeting components by id or column: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.