Saltar al contenido principal

UI HUD

UI HUD

A group of HUD modules anchored to one corner of the screen. One entry is one corner, on purpose: a HUD is read at the edges, and an author who wants modules in three corners writes three entries rather than repeating a corner on every module. The runtime composes every entry a player can see into a single screen. This is not a menu. Nothing opens, the player is never locked, there is no cursor and no click. What it borrows from menus is everything else — the grid, the layers, the lists, the bindings, the visibility — so a module and a menu cell line up to the pixel.

Campos

CampoTipoPredeterminadoDescripción
cornerUiGridAnchorTOP_LEFTCorner this group is measured from; offsets count inwards from it on both axesValores:TOP_LEFTTOP_RIGHTBOTTOM_LEFTBOTTOM_RIGHT
layersList<UiLayerConfig>?—Layers of this group, from back to front; they may carry lists like a menu's
UiLayerConfig (4)
CampoTipoPredeterminadoDescripción
layerIdString—Layer identifier, unique inside the view
componentsList<UiComponentConfig>emptyComponents of this layer
UiComponentConfig (33)
CampoTipoPredeterminadoDescripción
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 excludedValores: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 drawnValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
hoverPaletteUiPaletteOptionNONETint while the cursor rests on it; NONE keeps the idle tintValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
disabledPaletteUiPaletteOptionNONETint while its criteria do not match; NONE keeps the idle tintValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
labelString—Shown while the cursor rests on it, beside the screenPlaceholdersColores
textString—Drawn across the component in the vanilla fontPlaceholders
textPaletteUiPaletteOptionNONETint of that text; NONE draws it whiteValores:NONEFRAMESURFACESURFACE_LIGHTMUTEDBLUEBLUE_LIGHTCYANTEALGREENGREEN_LIGHTYELLOWORANGERED_DARKREDPURPLEWHITEBLACKINKSLATESTEELSTEEL_LIGHTMISTPAPERFORESTMINTGOLDAMBERWINECORALVIOLET
textEffectUiTextEffect——Valores: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 newlinePlaceholders
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 backdropValores: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)
CampoTipoPredeterminadoDescripción
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)
CampoTipoPredeterminadoDescripción
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 itemValores: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
visibilityUiVisibilityConfig?—Gating applied before the whole group is drawn
UiVisibilityConfig (2)
CampoTipoPredeterminadoDescripción
permissionString—Permission required to see this element; leave empty for none
conditionsList<UiConditionConfig>emptyFact comparisons that must all hold
UiConditionConfig (3)
CampoTipoPredeterminadoDescripción
factString—Fact name; an unwritten fact reads as zero
comparisonUiComparisonEQUALSHow the fact is compared to the thresholdValores:EQUALSNOT_EQUALSLESS_THANGREATER_THANAT_MOSTAT_LEAST
thresholdInt0Value the fact is compared against
priorityInt0Drawn over groups with a lower value when two overlap

How to use it​

A HUD group is a set of layers that stays on screen. Choose a corner: placements are then offsets counted inwards from that corner (for CENTRE, signed coordinates about the centre, with an even width coming out centred). Reuse the same components as a view; give gauges a source such as btcui_health_percent. Use priority to order overlapping groups and visibility (permission or fact conditions) to gate a group. A HUD group has no cursor and does not freeze the player; it is hidden while a view, dialogue, cinematic or the world map is open.