Namespace in reactor_ui.js

ReactorUI

165 public functions in 6 groups · show internal (_) functions

Designing a custom interface.

Quick Reference

Setup & Creation 8

load() Loads the interfaces file once; missing or malformed means none.
installCaptureHooks() Install capture hooks.
registerPluginCommands() Register plugin commands.
createOverlay() Creates the overlay.
createFightHud() Creates the fight hud.
createActionHud() Creates the action hud.
createBattleHud() Creates the battle hud.
installSceneRouting() Wraps the latest plugin-provided methods; safe to verify repeatedly.

Getting Information 9

dataUrls() The files to read, first found wins: a battle test reads the Test_ copy the editor wrote from its unsaved dat…
resolveRect() Screen-space rectangle of a node given its parent's rectangle.
colorIndex() Window-skin index of a text colour the game drew with, or the colour itself.
resolveActor() Resolves the common actor binding carried by Text, Image, Gauge, and actor Lists.
resolveContextTokens() Resolve context tokens.
resolveActorTokens() Resolve actor tokens.
listRowsSignature() List rows signature.
itemKind() Item kind.
listRows() Rows for the fixed declarative List sources.

Checks (True / False) 8

isPreview() Whether it is preview.
isReady() Whether it is ready.
isPoolHidden() Whether key is a resource pool the project turned off (System.json rrPoolsOff, Database > System 1 > Options)…
isActiveActor() The actor choosing commands now, or acting now: the one a turn marker points at.
isSpriteElement() Parts that change every frame live in sprites over the row, so the row itself is not repainted.
isInterfaceClass() Whether a class on SceneManager's stack is this scene.
isPersonalAction() Whether it is personal action.
canUseOn() Whether it can use on.

Actions 15

endPreview() Ends the interface preview; there is no game underneath to return to.
beginCapture() Open the requested scene the way the game would: every menu opens over the map (plugins snapshot it for the m…
openCaptureScene() From a running map, open the requested scene as the game would.
performCapture() Write the scene to the request's directory; true when written.
call() Call.
equipPreviewActor() The actor as it would be with the equipment chosen in compareContext, while that list has focus - the stock e…
changeOption() Changes the option.
releaseHudBitmaps() Let go of every picture the HUD made under a window or layer (see hudBitmap).
destroyFightHud() Destroy fight hud.
placeFightWindow() A stock map battle window, moved and sized to its node; it slides in each time it opens.
takeFightHud() The HUD for a battle that begins: the one made ahead when it was made from this same record, else a new one.
destroyActionHud() Destroy action hud.
releaseMapHuds() A map scene's battle HUDs are let go with it.
placeBattleWindow() Place battle window.
runCommandEvent() A Common Event command: the event runs now while the battle waits (time progress stops, its messages show), t…

Updating & Drawing 18

drawActorGauge() Draws the actor gauge.
drawLog() Draws the log.
updateCapture() Once per frame while a capture is pending: wait for the scene to be the requested one, started, settled, and…
drawnCenter() Where a window's center is drawn, in its layer: what direction keys and anything else that asks "where is it"…
drawWindowIcon() Draws the window icon.
drawImageMeter() A meter picture cut to the rate and stretched to the part's box.
drawImageNumber() Digits from a sheet of ten (0-9) side by side, scaled to the part's height; other characters leave a gap.
updateFightHud() Updates the fight hud each frame.
updateFightScene() Once a frame on the map: the HUD exists exactly while a battle runs here.
refreshActionState() What changes only when the battle says so: the player's unit, the weapon's picture and steps, the keys and co…
updateActionHud() Updates the action hud each frame.
updateActionCrosshair() The crosshair: one sprite at the battle's aim point, redrawn when its whole-number state changes.
updateActionBars() Bars over opponents that were hit a moment ago or are aimed at, from a pool; and the mark on the locked one.
updateActionDamage() Where a hit came from (an arc that turns toward it and fades) and the low-HP edge (one small picture, stretch…
updateActionScene() Once a frame on the map: the HUD of a real-time mode exists exactly while a battle of that mode runs here.
updateBattleHud() Updates the battle hud each frame.
updateCommandEvent() Runs a Common Event command each frame; returns true while one runs.
updateBattleCursor() Updates the battle cursor each frame.

Other 107

screenMetrics() Physical screen and centred UI-area metrics used by every interface.
migrateLegacyCoordinates() Re-expresses legacy UI-area root offsets in physical screen pixels.
windowRect() Converts a physical rectangle to coordinates local to the scene's WindowLayer.
interface() Interface.
storedMode() A stored record's mode as normalizeInterface would give it, without building the record.
cssColor() A CSS color from "#rrggbb" and an 0-255 alpha.
controlStyle() Sparse visual-state values resolved without changing the authored node.
nineSliceSegments() Source and destination rectangles for a clamped nine-slice draw.
normalizeCondition() Normalize condition.
normalizeActorElements() Normalize actor elements.
actorPanelLayout() Actor panel layout.
actorPanelLayoutAll() Actor panel layout all.
actorGaugePath() Actor gauge path.
normalizeAction() Normalize action.
normalizeSe() Normalize se.
normalizeLiteralItems() Normalize literal items.
normalizeNode() Normalize node.
upgradeMenuActorPanel() Upgrade menu actor panel.
upgradeMenuFormation() Upgrade menu formation.
normalizeInterface() Normalize interface.
orderNodes() Nodes in draw order: every parent before its children, siblings in authored order, so a child never hides und…
normalizeDesign() The size a record was designed for: { width, height }, or null when it does not say.
fitRecord() Fits a normalized record to the screen it runs on (or to screen, for a preview).
shownScale() How large a node window is shown: 1 unless its record was fitted to another screen.
evaluateCondition() Evaluate condition.
compileCondition() Compile condition.
compileScript() Compile script.
bootInterfaceId() Boot interface id.
launchTokens() Every &-delimited launch-line token, from the URL and NW's argv.
captureRequest() The capture request on the launch line, or null.
wrapMethod() Wrap method.
partySlot() 0-based party slot of an actor, or -1 when it is not in the party.
slotCode() A slot-bound code for a party member, or the literal for anyone else.
cssToHex() "#rrggbb" + 0..255 alpha from a CSS colour the engine drew with.
imageSourceFromUrl() Image-node source and file for an image URL the engine loaded, or null.
imageFromFrame() An image element (or {icon}) for a blt / sprite frame off a loaded image.
mergeTextRuns() Text primitives on one line become one Text element with \C[n] and \I[n] codes; centred / right-aligned draws…
elementsFromDraws() Elements from a bitmap's draw log (text merged, icons folded into text, images and fills kept).
fontContext() Font context.
spriteElements() Elements of an inner sprite of a window (gauges, names) or a scene sprite, at (x, y).
windowElements() Everything a window shows, in window-local pixels.
sceneElements() Sprites of the scene outside windows (title art, drawn titles), in screen pixels.
collectWindows() Every window in the scene tree with its screen rect.
screenshotDataUrl() Screenshot data url.
motionState() A moving node's state: its settings, its age in updates, and the pose it is drawn at.
motionLeave() How far the interface has closed (0 to 1), or -1 while it is not closing: Appear runs backward as it closes.
linkCarried() Once a scene or an overlay has made its windows: which of them stand inside a node that moves or has an Angle.
partyMember() The party member in a 0-based slot, or null past the party's end.
actorFromContext() Actor from context.
actorTextValue() Actor text value.
contextTokens() The {context.field} pattern and its lower-case field table, built once (again if the field list grows).
convertPartyCodes() Convert party codes.
formatListRow() Format list row.
filterRow() The row selected in the list a node follows (its filterContext), or null.
filterCategory() The inventory category a node shows: the chosen category row's, else its own.
inCategory() In category.
goodsItem() A Shop Processing goods entry [type, id, priceType, price] as its database record.
skillCostText() A skill's cost the way the stock skill list prints it: TP first, then MP.
slotDateText() Slot date text.
readInput() Read input.
writeInput() Write input.
iconBitmap() Isolate atlas tiles before scaling or fractional placement.
gaugeLabelRenderer() Borrow the engine's escape parser without creating an extra window.
gaugeSpriteClass() Sprite_Gauge at the node's size: the bar is the lower half, label and value fonts scale with the height (24 p…
readyPicture() A picture that is loaded, or null: ref if it can be drawn, else fallback (the normal picture while a state's…
blitPicture() Draws a picture over a rectangle of a bitmap by fit: stretched, whole inside, repeated or nine-sliced by the…
spritePortrait() Whether a panel draws its portrait as an animated sprite rather than into the row.
softImage() Soft image.
softFailed() Whether a soft image failed to load (the caller draws its fallback).
whenReady() When ready.
faceEvent() Face event.
faceState() The portrait's frame and motion for an actor now; timers run down once a frame.
atbRate() An actor's time gauge in a time-progress battle (0 to 1), else 0.
actorGaugeData() Actor gauge data.
actorPanelRevision() Actor panel revision.
interfacePictures() Every picture a record's nodes name as their look: fills, state and row pictures, gauge bars.
optionProbe() The stock Options window's list, made with no window behind it: makeCommandList and everything plugins hang o…
fightStripUnit() The unit whose turn tile is under a point of the screen, or 0: the Tactical HUD's strip can be clicked to loo…
fightPanelAt() Whether a point of the screen is on one of the HUD's unit panels that can be seen.
fightTheme() Fonts, colors, terms and pictures as the game has them, for the shared drawing.
fightThumbnail() A model's portrait for the HUD: a canvas, null while it is being made, false when there is none.
fightModelOf() The model a unit is shown by on this map (a flat map draws models too), or null.
fightMenuRow() The highlighted row of the map battle menu that is up, written into out (kind, symbol, enabled, item, and key…
fightIconExists() Whether the project's icon sheet has a picture at an index (an empty cell has none).
styleFightCommands() The battle's own commands (Mount, Dismount, Overwatch, Wait, End Turn) on the stock command window, written t…
fitFightWindow() A list window sized to what it lists, inside its node's rectangle and against the edges its anchor names: the…
fightNow() The Tactical battle running on the map the party stands on, or null (no battle, another map, another mode).
fightInterface() The Tactical battle HUD record: the one System binds as Tactical Battle (reactorTacticalInterfaceId, a Tactic…
hudBitmap() A picture a map battle HUD draws into (a turn box, the crosshair, a bar).
readyFightHud() The HUD a battle on this map would open, made ahead on a quiet map frame and kept out of sight, so the battle…
actionNow() The battle of a real-time mode (Action, First Person) running on the map the party stands on, or null.
actionInterface() A real-time mode's HUD record: the one System binds for that mode (reactorActionInterfaceId / reactorFirstPer…
battleInterface() The project's battle HUD record (System 2), or null.
battleSlotRect() An actor's row in the HUD's party panel, in window-layer coordinates.
customizeBattleCommands() Command alignment and an authored command list on the Actor or Party Command window.
escapeFromActorCommand() Escape chosen by an actor: the party gives up its choices first, as when Escape is chosen before anyone acts,…
defaultCursorBitmap() A small downward arrow, the cursor when no image is chosen.
battlerTop() The top centre of a battler as it is drawn, in the scene's coordinates: the projected box of a 3D model in a…
battleTarget() Where the cursor points: over the chosen enemy, or the chosen ally's HUD row (else their sprite).
victoryTheme() Fonts, colors, pictures and the game's own words, for the shared drawing.
replacementRole() Replacement role.
replacementId() Replacement id.
gotoStockRole() Goto stock role.
gotoStockTitle() Goto stock title.
routedId() The record bound in place of a stock scene class, or 0.
sceneRouter() The scene is swapped as late as possible, so plugins wrapped around goto and push see the stock class: a pre-…
sceneRoutingInstalled() Scene routing installed.

Setup & Creation

load

static source
ReactorUI.load()

Loads the interfaces file once; missing or malformed means none.

installCaptureHooks

static source
ReactorUI.installCaptureHooks()

Install capture hooks.

registerPluginCommands

static source
ReactorUI.registerPluginCommands()

Register plugin commands.

createOverlay

static source
ReactorUI.createOverlay(scene, record, options = {})

Creates the overlay.

createFightHud

static source
ReactorUI.createFightHud(scene, record)

Creates the fight hud.

createActionHud

static source
ReactorUI.createActionHud(scene, record, mode)

Creates the action hud.

createBattleHud

static source
ReactorUI.createBattleHud(scene, record)

Creates the battle hud.

installSceneRouting

static source
ReactorUI.installSceneRouting()

Wraps the latest plugin-provided methods; safe to verify repeatedly.

Getting Information

dataUrls

static source
ReactorUI.dataUrls()

The files to read, first found wins: a battle test reads the Test_ copy the editor wrote from its unsaved database, when it wrote one.

resolveRect

static source
ReactorUI.resolveRect(node, parentRect, measured)

Screen-space rectangle of a node given its parent's rectangle.

colorIndex

static source
ReactorUI.colorIndex(color)

Window-skin index of a text colour the game drew with, or the colour itself.

resolveActor

static source
ReactorUI.resolveActor(node, scene)

Resolves the common actor binding carried by Text, Image, Gauge, and actor Lists.

resolveContextTokens

static source
ReactorUI.resolveContextTokens(value, node, scene)

Resolve context tokens.

resolveActorTokens

static source
ReactorUI.resolveActorTokens(value, node, scene)

Resolve actor tokens.

listRowsSignature

static source
ReactorUI.listRowsSignature(rows)

List rows signature.

itemKind

static source
ReactorUI.itemKind(item)

Item kind.

listRows

static source
ReactorUI.listRows(node, scene)

Rows for the fixed declarative List sources.

Checks (True / False)

isPreview

static source
ReactorUI.isPreview()

Whether it is preview.

isReady

static source
ReactorUI.isReady()

Whether it is ready.

isPoolHidden

static source
ReactorUI.isPoolHidden(key)

Whether key is a resource pool the project turned off (System.json rrPoolsOff, Database > System 1 > Options): its gauge is not drawn.

Details

Whether key is a resource pool the project turned off (System.json rrPoolsOff, Database > System 1 > Options): its gauge is not drawn. HP is never off.

isActiveActor

static source
ReactorUI.isActiveActor(actor)

The actor choosing commands now, or acting now: the one a turn marker points at.

isSpriteElement

static source
ReactorUI.isSpriteElement(node, element)

Parts that change every frame live in sprites over the row, so the row itself is not repainted.

isInterfaceClass

static source
ReactorUI.isInterfaceClass(sceneClass)

Whether a class on SceneManager's stack is this scene.

Details

Whether a class on SceneManager's stack is this scene. pixi_compat wraps the global after this file loads, so the stack holds the wrapper, which shares this prototype.

isPersonalAction

static source
ReactorUI.isPersonalAction(action)

Whether it is personal action.

canUseOn

static source
ReactorUI.canUseOn(user, item, targets)

Whether it can use on.

Actions

endPreview

static source
ReactorUI.endPreview()

Ends the interface preview; there is no game underneath to return to.

beginCapture

static source
ReactorUI.beginCapture(request)

Open the requested scene the way the game would: every menu opens over the map (plugins snapshot it for the menu background and assume it is there), a battle starts from the map, and the title stands on its own.

Details

Open the requested scene the way the game would: every menu opens over the map (plugins snapshot it for the menu background and assume it is there), a battle starts from the map, and the title stands on its own. So a new game is set up, the map starts, and only then is the scene pushed.

openCaptureScene

static source
ReactorUI.openCaptureScene()

From a running map, open the requested scene as the game would.

performCapture

static source
ReactorUI.performCapture()

Write the scene to the request's directory; true when written.

call

static source
ReactorUI.call(id)

Call.

equipPreviewActor

static source
ReactorUI.equipPreviewActor(node, scene, actor)

The actor as it would be with the equipment chosen in compareContext, while that list has focus - the stock equip screen's comparison.

Details

The actor as it would be with the equipment chosen in compareContext, while that list has focus - the stock equip screen's comparison. Null when there is nothing to compare.

changeOption

static source
ReactorUI.changeOption(symbol, forward, wrap)

Changes the option.

releaseHudBitmaps

static source
ReactorUI.releaseHudBitmaps(container)

Let go of every picture the HUD made under a window or layer (see hudBitmap).

Details

Let go of every picture the HUD made under a window or layer (see hudBitmap). Returns how many.

destroyFightHud

static source
ReactorUI.destroyFightHud(scene, hud)

Destroy fight hud.

placeFightWindow

static source
ReactorUI.placeFightWindow(scene, hud, entry)

A stock map battle window, moved and sized to its node; it slides in each time it opens.

takeFightHud

static source
ReactorUI.takeFightHud(scene, record)

The HUD for a battle that begins: the one made ahead when it was made from this same record, else a new one.

destroyActionHud

static source
ReactorUI.destroyActionHud(scene, hud)

Destroy action hud.

releaseMapHuds

static source
ReactorUI.releaseMapHuds(scene)

A map scene's battle HUDs are let go with it.

Details

A map scene's battle HUDs are let go with it. A scene that ends under a battle (the menu, a transfer, a load, Game Over) never sees the frame on which the battle is over, and what its HUD holds outside the scene would stay for good: the pictures it made, the listener of its feed, the built-in HUD's stand-down.

placeBattleWindow

static source
ReactorUI.placeBattleWindow(scene, hud, entry)

Place battle window.

runCommandEvent

static source
ReactorUI.runCommandEvent(scene, win, commonEventId)

A Common Event command: the event runs now while the battle waits (time progress stops, its messages show), then the window that chose it opens again for the same actor, or the party.

Details

A Common Event command: the event runs now while the battle waits (time progress stops, its messages show), then the window that chose it opens again for the same actor, or the party. It is not the actor's action; a skill with a Common Event effect is.

Updating & Drawing

drawActorGauge

static source
ReactorUI.drawActorGauge(ctx, rect, element, rate, colors)

Draws the actor gauge.

drawLog

static source
ReactorUI.drawLog(bitmap)

Draws the log.

updateCapture

static source
ReactorUI.updateCapture()

Once per frame while a capture is pending: wait for the scene to be the requested one, started, settled, and its windows fully open (or 3 seconds, whichever comes first), then capture and exit.

drawnCenter

static source
ReactorUI.drawnCenter(window, out)

Where a window's center is drawn, in its layer: what direction keys and anything else that asks "where is it" go by.

drawWindowIcon

static source
ReactorUI.drawWindowIcon(index, x, y)

Draws the window icon.

drawImageMeter

static source
ReactorUI.drawImageMeter(bitmap, r, file, rate, redraw, rows, trail)

A meter picture cut to the rate and stretched to the part's box.

Details

A meter picture cut to the rate and stretched to the part's box. A two-row picture (MOG's) holds the meter on top and the damage trail underneath; the trail is drawn at trail first. Returns false when the picture is missing, so the caller can draw the plain gauge instead.

drawImageNumber

static source
ReactorUI.drawImageNumber(bitmap, r, file, text, align, redraw)

Digits from a sheet of ten (0-9) side by side, scaled to the part's height; other characters leave a gap.

updateFightHud

static source
ReactorUI.updateFightHud(scene, hud, fight)

Updates the fight hud each frame.

updateFightScene

static source
ReactorUI.updateFightScene(scene)

Once a frame on the map: the HUD exists exactly while a battle runs here.

refreshActionState

static source
ReactorUI.refreshActionState(fight, hud, data, state)

What changes only when the battle says so: the player's unit, the weapon's picture and steps, the keys and costs.

updateActionHud

static source
ReactorUI.updateActionHud(scene, hud, fight)

Updates the action hud each frame.

updateActionCrosshair

static source
ReactorUI.updateActionCrosshair(hud, entry, data, state, shown)

The crosshair: one sprite at the battle's aim point, redrawn when its whole-number state changes.

updateActionBars

static source
ReactorUI.updateActionBars(hud, entry, data, state, shown)

Bars over opponents that were hit a moment ago or are aimed at, from a pool; and the mark on the locked one.

updateActionDamage

static source
ReactorUI.updateActionDamage(hud, entry, data, state, shown)

Where a hit came from (an arc that turns toward it and fades) and the low-HP edge (one small picture, stretched).

updateActionScene

static source
ReactorUI.updateActionScene(scene)

Once a frame on the map: the HUD of a real-time mode exists exactly while a battle of that mode runs here.

updateBattleHud

static source
ReactorUI.updateBattleHud(scene, hud)

Updates the battle hud each frame.

updateCommandEvent

static source
ReactorUI.updateCommandEvent(scene)

Runs a Common Event command each frame; returns true while one runs.

updateBattleCursor

static source
ReactorUI.updateBattleCursor(scene, hud, entry)

Updates the battle cursor each frame.

Other

screenMetrics

static source
ReactorUI.screenMetrics()

Physical screen and centred UI-area metrics used by every interface.

migrateLegacyCoordinates

static source
ReactorUI.migrateLegacyCoordinates(nodes, metrics)

Re-expresses legacy UI-area root offsets in physical screen pixels.

windowRect

static source
ReactorUI.windowRect(rect, scene, fit)

Converts a physical rectangle to coordinates local to the scene's WindowLayer.

interface

static source
ReactorUI.interface(id)

Interface.

storedMode

static source
ReactorUI.storedMode(raw)

A stored record's mode as normalizeInterface would give it, without building the record.

cssColor

static source
ReactorUI.cssColor(hex, alpha)

A CSS color from "#rrggbb" and an 0-255 alpha.

controlStyle

static source
ReactorUI.controlStyle(node, state)

Sparse visual-state values resolved without changing the authored node.

nineSliceSegments

static source
ReactorUI.nineSliceSegments(sw, sh, dw, dh, insets)

Source and destination rectangles for a clamped nine-slice draw.

normalizeCondition

static source
ReactorUI.normalizeCondition(raw)

Normalize condition.

normalizeActorElements

static source
ReactorUI.normalizeActorElements(raw)

Normalize actor elements.

actorPanelLayout

static source
ReactorUI.actorPanelLayout(node, width, height, fontSize)

Actor panel layout.

actorPanelLayoutAll

static source
ReactorUI.actorPanelLayoutAll(node, width, height, fontSize)

Actor panel layout all.

actorGaugePath

static source
ReactorUI.actorGaugePath(ctx, rect, shape, corner)

Actor gauge path.

normalizeAction

static source
ReactorUI.normalizeAction(raw)

Normalize action.

normalizeSe

static source
ReactorUI.normalizeSe(raw)

Normalize se.

normalizeLiteralItems

static source
ReactorUI.normalizeLiteralItems(raw)

Normalize literal items.

normalizeNode

static source
ReactorUI.normalizeNode(raw)

Normalize node.

upgradeMenuActorPanel

static source
ReactorUI.upgradeMenuActorPanel(entry)

Upgrade menu actor panel.

upgradeMenuFormation

static source
ReactorUI.upgradeMenuFormation(entry, enabled, label)

Upgrade menu formation.

normalizeInterface

static source
ReactorUI.normalizeInterface(raw)

Normalize interface.

orderNodes

static source
ReactorUI.orderNodes(nodes)

Nodes in draw order: every parent before its children, siblings in authored order, so a child never hides under its own parent.

normalizeDesign

static source
ReactorUI.normalizeDesign(raw)

The size a record was designed for: { width, height }, or null when it does not say.

fitRecord

static source
ReactorUI.fitRecord(record, screen)

Fits a normalized record to the screen it runs on (or to screen, for a preview).

Details

Fits a normalized record to the screen it runs on (or to screen, for a preview). A record that names no design size, or whose design size is the screen's, is returned as it is: fit stays null and nothing in its layout changes. Otherwise its nodes are placed in the screen's frame in the record's own units and fit says how large to show them: every window is made at its designed size and shown at fit.scale, so text, padding and line height shrink or grow together.

shownScale

static source
ReactorUI.shownScale(window)

How large a node window is shown: 1 unless its record was fitted to another screen.

evaluateCondition

static source
ReactorUI.evaluateCondition(condition, scene)

Evaluate condition.

compileCondition

static source
ReactorUI.compileCondition(source)

Compile condition.

compileScript

static source
ReactorUI.compileScript(source)

Compile script.

bootInterfaceId

static source
ReactorUI.bootInterfaceId()

Boot interface id.

launchTokens

static source
ReactorUI.launchTokens()

Every &-delimited launch-line token, from the URL and NW's argv.

captureRequest

static source
ReactorUI.captureRequest(tokens)

The capture request on the launch line, or null.

wrapMethod

static source
ReactorUI.wrapMethod(proto, name, wrapper)

Wrap method.

partySlot

static source
ReactorUI.partySlot(actor)

0-based party slot of an actor, or -1 when it is not in the party.

slotCode

static source
ReactorUI.slotCode(actor, code, literal)

A slot-bound code for a party member, or the literal for anyone else.

cssToHex

static source
ReactorUI.cssToHex(color)

"#rrggbb" + 0..255 alpha from a CSS colour the engine drew with.

imageSourceFromUrl

static source
ReactorUI.imageSourceFromUrl(url)

Image-node source and file for an image URL the engine loaded, or null.

imageFromFrame

static source
ReactorUI.imageFromFrame(frame)

An image element (or {icon}) for a blt / sprite frame off a loaded image.

mergeTextRuns

static source
ReactorUI.mergeTextRuns(runs, ctx)

Text primitives on one line become one Text element with \C[n] and \I[n] codes; centred / right-aligned draws and code-carrying draws stand alone.

Details

Text primitives on one line become one Text element with \C[n] and \I[n] codes; centred / right-aligned draws and code-carrying draws stand alone. ctx.mainFontSize and ctx.lineHeight describe the window font so a line's y can be re-expressed for a text node, whose line box is fontSize + (lineHeight - mainFontSize) tall.

elementsFromDraws

static source
ReactorUI.elementsFromDraws(draws, ctx)

Elements from a bitmap's draw log (text merged, icons folded into text, images and fills kept).

fontContext

static source
ReactorUI.fontContext(win)

Font context.

spriteElements

static source
ReactorUI.spriteElements(sprite, x, y, ctx)

Elements of an inner sprite of a window (gauges, names) or a scene sprite, at (x, y).

windowElements

static source
ReactorUI.windowElements(win)

Everything a window shows, in window-local pixels.

sceneElements

static source
ReactorUI.sceneElements(scene)

Sprites of the scene outside windows (title art, drawn titles), in screen pixels.

collectWindows

static source
ReactorUI.collectWindows(scene)

Every window in the scene tree with its screen rect.

screenshotDataUrl

static source
ReactorUI.screenshotDataUrl()

Screenshot data url.

motionState

static source
ReactorUI.motionState(node)

A moving node's state: its settings, its age in updates, and the pose it is drawn at.

motionLeave

static source
ReactorUI.motionLeave(window, progress)

How far the interface has closed (0 to 1), or -1 while it is not closing: Appear runs backward as it closes.

linkCarried

static source
ReactorUI.linkCarried(windows, nodes)

Once a scene or an overlay has made its windows: which of them stand inside a node that moves or has an Angle.

Details

Once a scene or an overlay has made its windows: which of them stand inside a node that moves or has an Angle. Such a window keeps its ancestors that carry it, outermost first (_uiCarry), and each moving ancestor keeps the windows it carries, so its update places them. Worked out here, once; a window with no such ancestor and no motion keeps _uiPosed false and is placed as it always was.

partyMember

static source
ReactorUI.partyMember(slot)

The party member in a 0-based slot, or null past the party's end.

actorFromContext

static source
ReactorUI.actorFromContext(scene, name)

Actor from context.

actorTextValue

static source
ReactorUI.actorTextValue(actor, token)

Actor text value.

contextTokens

static source
ReactorUI.contextTokens()

The {context.field} pattern and its lower-case field table, built once (again if the field list grows).

convertPartyCodes

static source
ReactorUI.convertPartyCodes(text)

Convert party codes.

formatListRow

static source
ReactorUI.formatListRow(template, row)

Format list row.

filterRow

static source
ReactorUI.filterRow(node, scene)

The row selected in the list a node follows (its filterContext), or null.

filterCategory

static source
ReactorUI.filterCategory(node, scene)

The inventory category a node shows: the chosen category row's, else its own.

inCategory

static source
ReactorUI.inCategory(item, category)

In category.

goodsItem

static source
ReactorUI.goodsItem(good)

A Shop Processing goods entry [type, id, priceType, price] as its database record.

skillCostText

static source
ReactorUI.skillCostText(actor, skill)

A skill's cost the way the stock skill list prints it: TP first, then MP.

slotDateText

static source
ReactorUI.slotDateText(timestamp)

Slot date text.

readInput

static source
ReactorUI.readInput(node, scene)

Read input.

writeInput

static source
ReactorUI.writeInput(node, scene, value)

Write input.

iconBitmap

static source
ReactorUI.iconBitmap(sheet, index)

Isolate atlas tiles before scaling or fractional placement.

Details

Isolate atlas tiles before scaling or fractional placement. Canvas filtering otherwise samples neighboring icons, leaving bright seams at tile edges.

gaugeLabelRenderer

static source
ReactorUI.gaugeLabelRenderer(gauge)

Borrow the engine's escape parser without creating an extra window.

gaugeSpriteClass

static source
ReactorUI.gaugeSpriteClass()

Sprite_Gauge at the node's size: the bar is the lower half, label and value fonts scale with the height (24 px is the engine's own), and a "variable" gauge reads a game variable against the node's max.

readyPicture

static source
ReactorUI.readyPicture(ref, fallback, redraw)

A picture that is loaded, or null: ref if it can be drawn, else fallback (the normal picture while a state's own is loading or missing).

Details

A picture that is loaded, or null: ref if it can be drawn, else fallback (the normal picture while a state's own is loading or missing). redraw runs when a picture still loading arrives or fails.

blitPicture

static source
ReactorUI.blitPicture(bitmap, image, x, y, width, height, fit, node, opacity, radius)

Draws a picture over a rectangle of a bitmap by fit: stretched, whole inside, repeated or nine-sliced by the node's slice borders.

spritePortrait

static source
ReactorUI.spritePortrait(node)

Whether a panel draws its portrait as an animated sprite rather than into the row.

softImage

static source
ReactorUI.softImage(ref)

Soft image.

softFailed

static source
ReactorUI.softFailed(bitmap)

Whether a soft image failed to load (the caller draws its fallback).

whenReady

static source
ReactorUI.whenReady(bitmap, redraw)

When ready.

faceEvent

static source
ReactorUI.faceEvent(actor, kind)

Face event.

faceState

static source
ReactorUI.faceState(actor)

The portrait's frame and motion for an actor now; timers run down once a frame.

atbRate

static source
ReactorUI.atbRate(actor)

An actor's time gauge in a time-progress battle (0 to 1), else 0.

actorGaugeData

static source
ReactorUI.actorGaugeData(actor, key, element = {})

Actor gauge data.

actorPanelRevision

static source
ReactorUI.actorPanelRevision(node, rows)

Actor panel revision.

interfacePictures

static source
ReactorUI.interfacePictures(record)

Every picture a record's nodes name as their look: fills, state and row pictures, gauge bars.

optionProbe

static source
ReactorUI.optionProbe()

The stock Options window's list, made with no window behind it: makeCommandList and everything plugins hang on it run on a stand-in that only keeps the list.

Details

The stock Options window's list, made with no window behind it: makeCommandList and everything plugins hang on it run on a stand-in that only keeps the list. Its statusText, processOk, cursorRight and cursorLeft are the stock window's and the plugins', so an added option reads and changes as it would there. Null where there is no stock window or its list cannot be made this way.

fightStripUnit

static source
ReactorUI.fightStripUnit(x, y)

The unit whose turn tile is under a point of the screen, or 0: the Tactical HUD's strip can be clicked to look at a unit (the battle asks this of a press before it reads the press for the map under the strip).

fightPanelAt

static source
ReactorUI.fightPanelAt(x, y)

Whether a point of the screen is on one of the HUD's unit panels that can be seen.

Details

Whether a point of the screen is on one of the HUD's unit panels that can be seen. A panel covers the map: what lies behind it is not pointed at through it.

fightTheme

static source
ReactorUI.fightTheme()

Fonts, colors, terms and pictures as the game has them, for the shared drawing.

fightThumbnail

static source
ReactorUI.fightThumbnail(model)

A model's portrait for the HUD: a canvas, null while it is being made, false when there is none.

fightModelOf

static source
ReactorUI.fightModelOf(unit)

The model a unit is shown by on this map (a flat map draws models too), or null.

fightMenuRow

static source
ReactorUI.fightMenuRow(out)

The highlighted row of the map battle menu that is up, written into out (kind, symbol, enabled, item, and key, a number that changes when the row does), or null with no menu up.

Details

The highlighted row of the map battle menu that is up, written into out (kind, symbol, enabled, item, and key, a number that changes when the row does), or null with no menu up.

fightIconExists

static source
ReactorUI.fightIconExists(index)

Whether the project's icon sheet has a picture at an index (an empty cell has none).

styleFightCommands

static source
ReactorUI.styleFightCommands(win, node)

The battle's own commands (Mount, Dismount, Overwatch, Wait, End Turn) on the stock command window, written the way the project writes Attack, Skill and Item so the window draws all its rows alike: the node's word, else the project's (System.json reactorBattle.terms), else the stock word in the case of those three; and, where those carry icons, an icon from the project's sheet as the same icon co…

Details

The battle's own commands (Mount, Dismount, Overwatch, Wait, End Turn) on the stock command window, written the way the project writes Attack, Skill and Item so the window draws all its rows alike: the node's word, else the project's (System.json reactorBattle.terms), else the stock word in the case of those three; and, where those carry icons, an icon from the project's sheet as the same icon code (the HUD's own drawing only where the sheet has no picture there). The rows share one alignment.

fitFightWindow

static source
ReactorUI.fitFightWindow(scene, entry, win)

A list window sized to what it lists, inside its node's rectangle and against the edges its anchor names: the command window as wide as its widest row and as tall as its rows (squeezed to keep the node's height where they allow, so it stands as tall as the panel beside it); the skill and item lists cut to whole rows.

fightNow

static source
ReactorUI.fightNow()

The Tactical battle running on the map the party stands on, or null (no battle, another map, another mode).

fightInterface

static source
ReactorUI.fightInterface()

The Tactical battle HUD record: the one System binds as Tactical Battle (reactorTacticalInterfaceId, a Tactical Battle HUD), else the stock layout sized for this screen.

hudBitmap

static source
ReactorUI.hudBitmap(width, height)

A picture a map battle HUD draws into (a turn box, the crosshair, a bar).

Details

A picture a map battle HUD draws into (a turn box, the crosshair, a bar). It is marked as the HUD's own, so the HUD can let it go when the battle ends: a sprite's destruction frees its texture but not the picture behind it, and one battle after another would leave them all with the graphics card's texture list.

readyFightHud

static source
ReactorUI.readyFightHud(scene)

The HUD a battle on this map would open, made ahead on a quiet map frame and kept out of sight, so the battle's first frame has only to show it (its windows were the longest thing on that frame).

Details

The HUD a battle on this map would open, made ahead on a quiet map frame and kept out of sight, so the battle's first frame has only to show it (its windows were the longest thing on that frame). Made only where the map names a unit or spawns one; scene._reactorFightHudReady is it, or false where there is nothing to ready.

actionNow

static source
ReactorUI.actionNow()

The battle of a real-time mode (Action, First Person) running on the map the party stands on, or null.

actionInterface

static source
ReactorUI.actionInterface(mode)

A real-time mode's HUD record: the one System binds for that mode (reactorActionInterfaceId / reactorFirstPersonInterfaceId, a record presented as that mode's HUD), else the mode's stock layout.

battleInterface

static source
ReactorUI.battleInterface()

The project's battle HUD record (System 2), or null.

battleSlotRect

static source
ReactorUI.battleSlotRect(hud, actor)

An actor's row in the HUD's party panel, in window-layer coordinates.

customizeBattleCommands

static source
ReactorUI.customizeBattleCommands(scene, win, node)

Command alignment and an authored command list on the Actor or Party Command window.

escapeFromActorCommand

static source
ReactorUI.escapeFromActorCommand(scene)

Escape chosen by an actor: the party gives up its choices first, as when Escape is chosen before anyone acts, so a failed escape starts the turn (turn-based) or leaves the party charging (time progress) instead of reopening a command window.

defaultCursorBitmap

static source
ReactorUI.defaultCursorBitmap()

A small downward arrow, the cursor when no image is chosen.

battlerTop

static source
ReactorUI.battlerTop(scene, sprite)

The top centre of a battler as it is drawn, in the scene's coordinates: the projected box of a 3D model in a battle room, else the sprite's own picture (its feet are at x, y) wherever the battlefield sits on screen.

battleTarget

static source
ReactorUI.battleTarget(scene, hud, node)

Where the cursor points: over the chosen enemy, or the chosen ally's HUD row (else their sprite).

victoryTheme

static source
ReactorUI.victoryTheme()

Fonts, colors, pictures and the game's own words, for the shared drawing.

replacementRole

static source
ReactorUI.replacementRole(sceneClass)

Replacement role.

replacementId

static source
ReactorUI.replacementId(role)

Replacement id.

gotoStockRole

static source
ReactorUI.gotoStockRole(role)

Goto stock role.

gotoStockTitle

static source
ReactorUI.gotoStockTitle()

Goto stock title.

routedId

static source
ReactorUI.routedId(sceneClass)

The record bound in place of a stock scene class, or 0.

sceneRouter

static source
ReactorUI.sceneRouter(method, base, engine)

The scene is swapped as late as possible, so plugins wrapped around goto and push see the stock class: a pre-title splash that steps in for Scene_Title still plays before a replaced title.

Details

The scene is swapped as late as possible, so plugins wrapped around goto and push see the stock class: a pre-title splash that steps in for Scene_Title still plays before a replaced title. The router next to the engine's goto (engine, installed before plugins load) makes the swap, and push reaches it through goto. A router installed over plugins only opens a route and, if no call ever reached the engine's router (a plugin that replaced goto outright), swaps the stock scene it left queued.

sceneRoutingInstalled

static source
ReactorUI.sceneRoutingInstalled()

Scene routing installed.