Namespace in reactor_ui_action.js

A

27 functions in 3 groups · hide internal

Designing a custom interface with motion in the editor.

Quick Reference

Checks (True / False) 2

isMode() Whether it is mode.
isActionNode() Whether it is action node.

Updating & Drawing 10

drawCrosshair() The crosshair at the middle of a size square.
drawVitals() Vitals at the origin.
drawWeapon() The weapon at the origin: its picture and name above, the magazine's count large over the magazine drawn as a…
drawHotbar() The hotbar at the origin: one framed slot per skill or item, its icon, its key at the top left, its cost at t…
drawTarget() The aimed or locked opponent at the origin: its name over its HP bar; a locked one sits between brackets.
drawWorldBar() One bar over an opponent in the world, at the origin (rate 0 to 1); an alerted one wears a mark above its lef…
drawLockMarker() The mark on the locked opponent: four corners of a square size wide.
drawDamageArc() Where a hit came from: an arc on a ring size wide, drawn pointing up (the game turns it toward the hit).
drawVignette() The low-HP edge: the screen's rim tinted, its middle clear.
drawInfo() Action Text at the origin: the objective, or the notices newest first (lines: [{ text, color }]).

Other 15

defaultProps() What a new node of a type starts as.
normalizeProps() A stored node's own settings, every value in range (missing ones at their defaults).
label() Label.
boundId() The id System binds as a mode's HUD (0: none of its own, the mode's stock layout plays).
mix() A 32-bit mix of whole numbers: what a node shows, folded into one number to compare against the last drawing.
crossState() The crosshair's state as whole numbers: { gap, onTarget, hit, kill, aiming, reload (0-12, 0 none), sprinting,…
crossKey() Cross key.
vitalsLayout() Vitals: [portrait], the name with the states beside it, HP large, MP and TP side by side under it.
hotbarLayout() Where the hotbar's slots sit: out.size, out.x0, out.y, out.step.
vignetteAlpha() How strong the low-HP edge is (0 to 1) at an HP rate, for a node's threshold.
keyName() A key as a key cap shows it: the digit or letter, or the key's short name.
hotbarKeys() The key each hotbar slot answers to, from a key map ({ code: name }, the game's Input.keyMapper).
stockNodes() Stock nodes.
stockRecord() A mode's stock HUD as a whole record (what a project with none of its own gets, and what Stock Layout builds).
sampleHud() Sample hud.

Checks (True / False)

isMode

static source
A.isMode(mode)

Whether it is mode.

isActionNode

static source
A.isActionNode(type)

Whether it is action node.

Updating & Drawing

drawCrosshair

static source
A.drawCrosshair(ctx, size, node, state)

The crosshair at the middle of a size square.

drawVitals

static source
A.drawVitals(ctx, width, height, node, hud, unit, theme)

Vitals at the origin.

Details

Vitals at the origin. unit is a unit view of the player (the Tactical HUD's: face, model, state icons). Returns false while a picture loads.

drawWeapon

static source
A.drawWeapon(ctx, width, height, node, hud, theme, extra)

The weapon at the origin: its picture and name above, the magazine's count large over the magazine drawn as a bar (round by round when it is small), and for a blade its combo's steps.

Details

The weapon at the origin: its picture and name above, the magazine's count large over the magazine drawn as a bar (round by round when it is small), and for a blade its combo's steps. While it reloads the bar fills. The number beside the name ("2/3") is the weapon's place in the switching order, hud.weapon.index, so it changes with each switch. (No reserve is drawn: the battle keeps no reserve ammunition, and the "Reserve" setting went with it; a stored showReserve is ignored.) extra: { steps, picture, carried: [iconIndex], switching }, the carried weapons in the switching order.

drawHotbar

static source
A.drawHotbar(ctx, width, height, node, hud, theme, extra)

The hotbar at the origin: one framed slot per skill or item, its icon, its key at the top left, its cost at the bottom right, a shade that drains from the top while it cools down; one that cannot be used is dimmed.

Details

The hotbar at the origin: one framed slot per skill or item, its icon, its key at the top left, its cost at the bottom right, a shade that drains from the top while it cools down; one that cannot be used is dimmed. extra: { keys: [text], costs: [text], costColors: [css] }.

drawTarget

static source
A.drawTarget(ctx, width, height, node, hud, theme)

The aimed or locked opponent at the origin: its name over its HP bar; a locked one sits between brackets.

drawWorldBar

static source
A.drawWorldBar(ctx, width, height, node, rate, alerted)

One bar over an opponent in the world, at the origin (rate 0 to 1); an alerted one wears a mark above its left end.

drawLockMarker

static source
A.drawLockMarker(ctx, size, color)

The mark on the locked opponent: four corners of a square size wide.

drawDamageArc

static source
A.drawDamageArc(ctx, size, color)

Where a hit came from: an arc on a ring size wide, drawn pointing up (the game turns it toward the hit).

drawVignette

static source
A.drawVignette(ctx, width, height, color)

The low-HP edge: the screen's rim tinted, its middle clear.

Details

The low-HP edge: the screen's rim tinted, its middle clear. Drawn small once and stretched.

drawInfo

static source
A.drawInfo(ctx, width, height, node, hud, theme, lines)

Action Text at the origin: the objective, or the notices newest first (lines: [{ text, color }]).

Other

defaultProps

static source
A.defaultProps(type)

What a new node of a type starts as.

normalizeProps

static source
A.normalizeProps(source, type)

A stored node's own settings, every value in range (missing ones at their defaults).

label

static source
A.label(node, key)

Label.

boundId

static source
A.boundId(system, mode)

The id System binds as a mode's HUD (0: none of its own, the mode's stock layout plays).

mix

static source
A.mix(hash, value)

A 32-bit mix of whole numbers: what a node shows, folded into one number to compare against the last drawing.

crossState

static source
A.crossState(hud, sprinting, out)

The crosshair's state as whole numbers: { gap, onTarget, hit, kill, aiming, reload (0-12, 0 none), sprinting, ranged }.

crossKey

static source
A.crossKey(state)

Cross key.

vitalsLayout

static source
A.vitalsLayout(node, width, height)

Vitals: [portrait], the name with the states beside it, HP large, MP and TP side by side under it.

hotbarLayout

static source
A.hotbarLayout(node, width, height, count, out)

Where the hotbar's slots sit: out.size, out.x0, out.y, out.step.

Details

Where the hotbar's slots sit: out.size, out.x0, out.y, out.step.

vignetteAlpha

static source
A.vignetteAlpha(node, hp, mhp)

How strong the low-HP edge is (0 to 1) at an HP rate, for a node's threshold.

keyName

static source
A.keyName(code)

A key as a key cap shows it: the digit or letter, or the key's short name.

hotbarKeys

static source
A.hotbarKeys(mapper, count, out)

The key each hotbar slot answers to, from a key map ({ code: name }, the game's Input.keyMapper).

stockNodes

static source
A.stockNodes(mode, metrics)

Stock nodes.

stockRecord

static source
A.stockRecord(mode, metrics)

A mode's stock HUD as a whole record (what a project with none of its own gets, and what Stock Layout builds).

sampleHud

static source
A.sampleHud(data, options)

Sample hud.