Namespace in reactor_ui.js

Scene_ReactorUI

72 functions in 7 groups · hide internal

Designing a custom interface.

Familiar territory. Scene_ReactorUI keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

Quick Reference

Setup & Creation 6

initialize() Sets up a new instance.
prepare() Prepare.
create() Create.
createBackground() Creates the background.
createNodes() Creates the nodes.
prepareActorContexts() A missing list must not strand commands bound to its actor context.

Getting Information 2

nameMaxLength() The longest name Name Input allows here, 0 when none was given.
measureText() Measure text.

Checks (True / False) 7

isPurchaseOnly() Whether it is purchase only.
isSelectingTarget() True while a Use action waits for its target in the party panel.
isReady() Whether it is ready.
needsCancelButton() Whether it needs cancel button.
needsPageButtons() Whether it needs page buttons.
canFocus() Whether it can focus.
isPreviewRoot() True when this interface is the preview's root: nothing sits under it.

Actions 28

setContext() Sets the context.
resumeState() Resume state.
restoreResumeState() Restores the resume state.
forgetPush() Takes back the state rememberForPush kept, when the push it was for did not happen.
start() Start.
setFocus() Sets the focus.
applyInterfaceTransition() Applies the interface transition.
beginCloseTransition() Begin close transition.
moveFocus() Nearest focusable button in a direction; wraps to the far side.
activateFocused() Activate focused.
activateWindow() Activate window.
closeAll() Closes the all.
pushScene() Leaves for another scene that will come back here when it pops.
performClose() Plays the close effect.
close() Close.
beginActorSelection() Begin actor selection.
endActorSelection() Ends the actor selection.
runAction() Run action.
useUser() Who uses a row: the skill list's actor, or for an item the stock Scene_Item's pick (best PHA).
beginUse() Use on a list row: an item or skill for friends picks its target in the party panel (one actor, everyone, or…
executeUse() Runs the use.
executeEquip() Equip the chosen candidate into its slot, then hand focus back (action id, else the Back node).
beginInput() A text input starts editing: typing always, the stock character grid when the node asks for it.
openCharacterGrid() The stock name-entry grid under the field, bound to the field's draft through a small stand-in for Window_Nam…
closeCharacterGrid() Closes the character grid.
beginQuantity() Buy or sell: the stock number window over the list asks how many.
endQuantity() Ends the quantity.
executeFileAction() Runs the file action.

Events, Commands & Input 2

onActorChange() Called when actor change happens.
onFileFailure() Called when file failure happens.

Updating & Drawing 9

refreshDependents() Redraws the dependents.
refreshAllLists() Every list re-reads its rows on its next update: after an item is used, equipped, bought or sold.
refreshNodeLayouts() Re-measures auto-sized text and repositions it and anchored descendants.
updateInterfaceTransition() Updates the interface transition each frame.
updateConditions() Updates the conditions each frame.
update() Update.
updateControlStates() Updates the control states each frame.
updateTouch() Updates the touch each frame.
updateInput() Updates the input each frame.

Other 18

shopGoods() Shop Processing's goods, [type, id, priceType, price] each; empty outside a shop.
sceneActor() The actor a Name Input screen was opened for, else the menu actor.
focusedNodeId() The focused control's node id, for conditions such as help text that follows focus.
pagesActors() Roles whose Q/W (page up/down) change the menu actor, as the stock scenes do.
interfaceId() Interface id.
context() Context.
rememberForPush() Keeps this interface's state for when the scene pushed over it pops back; once per push.
picturesReady() A scene opens with its pictures in place, so nothing pops in a moment later: it waits for them as it waits fo…
terminate() Terminate.
buttons() Buttons.
focusedWindow() Focused window.
acceptsInput() Accepts input.
focusInitial() Focus initial.
cancelClose() Undoes a close whose next interface could not open: this one shows again and takes input.
cancelInterface() Cancel interface.
commitInput() Commit input.
cancelInput() Cancel input.
reloadMapIfUpdated() Reload map if updated.

Setup & Creation

initialize

method source
Scene_ReactorUI.prototype.initialize()

Sets up a new instance. (Same as the RPG Maker MZ method of this name.)

prepare

method source
Scene_ReactorUI.prototype.prepare(interfaceId, role)

Prepare. (Same as the RPG Maker MZ method of this name.)

create

method source
Scene_ReactorUI.prototype.create()

Create. (Same as the RPG Maker MZ method of this name.)

createBackground

method source
Scene_ReactorUI.prototype.createBackground()

Creates the background. (Same as the RPG Maker MZ method of this name.)

createNodes

method source
Scene_ReactorUI.prototype.createNodes()

Creates the nodes. (Same as the RPG Maker MZ method of this name.)

prepareActorContexts

method source
Scene_ReactorUI.prototype.prepareActorContexts()

A missing list must not strand commands bound to its actor context.

Getting Information

nameMaxLength

method source
Scene_ReactorUI.prototype.nameMaxLength()

The longest name Name Input allows here, 0 when none was given.

measureText

method source
Scene_ReactorUI.prototype.measureText(node)

Measure text. (Same as the RPG Maker MZ method of this name.)

Checks (True / False)

isPurchaseOnly

method source
Scene_ReactorUI.prototype.isPurchaseOnly()

Whether it is purchase only. (Same as the RPG Maker MZ method of this name.)

isSelectingTarget

method source
Scene_ReactorUI.prototype.isSelectingTarget()

True while a Use action waits for its target in the party panel.

isReady

method source
Scene_ReactorUI.prototype.isReady()

Whether it is ready. (Same as the RPG Maker MZ method of this name.)

needsCancelButton

method source
Scene_ReactorUI.prototype.needsCancelButton()

Whether it needs cancel button. (Same as the RPG Maker MZ method of this name.)

needsPageButtons

method source
Scene_ReactorUI.prototype.needsPageButtons()

Whether it needs page buttons. (Same as the RPG Maker MZ method of this name.)

canFocus

method source
Scene_ReactorUI.prototype.canFocus(window)

Whether it can focus. (Same as the RPG Maker MZ method of this name.)

isPreviewRoot

method source
Scene_ReactorUI.prototype.isPreviewRoot()

True when this interface is the preview's root: nothing sits under it.

Actions

setContext

method source
Scene_ReactorUI.prototype.setContext(name, value)

Sets the context. (Same as the RPG Maker MZ method of this name.)

resumeState

method source
Scene_ReactorUI.prototype.resumeState()

Resume state. (Same as the RPG Maker MZ method of this name.)

restoreResumeState

method source
Scene_ReactorUI.prototype.restoreResumeState(state)

Restores the resume state. (Same as the RPG Maker MZ method of this name.)

forgetPush

method source
Scene_ReactorUI.prototype.forgetPush()

Takes back the state rememberForPush kept, when the push it was for did not happen.

start

method source
Scene_ReactorUI.prototype.start()

Start. (Same as the RPG Maker MZ method of this name.)

setFocus

method source
Scene_ReactorUI.prototype.setFocus(index)

Sets the focus. (Same as the RPG Maker MZ method of this name.)

applyInterfaceTransition

method source
Scene_ReactorUI.prototype.applyInterfaceTransition(progress)

Applies the interface transition. (Same as the RPG Maker MZ method of this name.)

beginCloseTransition

method source
Scene_ReactorUI.prototype.beginCloseTransition(callback)

Begin close transition. (Same as the RPG Maker MZ method of this name.)

moveFocus

method source
Scene_ReactorUI.prototype.moveFocus(direction)

Nearest focusable button in a direction; wraps to the far side.

activateFocused

method source
Scene_ReactorUI.prototype.activateFocused()

Activate focused. (Same as the RPG Maker MZ method of this name.)

activateWindow

method source
Scene_ReactorUI.prototype.activateWindow(window)

Activate window. (Same as the RPG Maker MZ method of this name.)

closeAll

method source
Scene_ReactorUI.prototype.closeAll()

Closes the all. (Same as the RPG Maker MZ method of this name.)

pushScene

method source
Scene_ReactorUI.prototype.pushScene(sceneClass, args = [])

Leaves for another scene that will come back here when it pops.

performClose

method source
Scene_ReactorUI.prototype.performClose()

Plays the close effect. (Same as the RPG Maker MZ method of this name.)

close

method source
Scene_ReactorUI.prototype.close()

Close. (Same as the RPG Maker MZ method of this name.)

beginActorSelection

method source
Scene_ReactorUI.prototype.beginActorSelection(action, use)

Begin actor selection. (Same as the RPG Maker MZ method of this name.)

endActorSelection

method source
Scene_ReactorUI.prototype.endActorSelection(confirm)

Ends the actor selection. (Same as the RPG Maker MZ method of this name.)

runAction

method source
Scene_ReactorUI.prototype.runAction(action)

Run action. (Same as the RPG Maker MZ method of this name.)

useUser

method source
Scene_ReactorUI.prototype.useUser(row)

Who uses a row: the skill list's actor, or for an item the stock Scene_Item's pick (best PHA).

beginUse

method source
Scene_ReactorUI.prototype.beginUse(action, row, window)

Use on a list row: an item or skill for friends picks its target in the party panel (one actor, everyone, or the user alone, by scope); anything else is used at once, as Scene_ItemBase does.

executeUse

method source
Scene_ReactorUI.prototype.executeUse(use, actor, window)

Runs the use. (Same as the RPG Maker MZ method of this name.)

executeEquip

method source
Scene_ReactorUI.prototype.executeEquip(action, row, window)

Equip the chosen candidate into its slot, then hand focus back (action id, else the Back node).

beginInput

method source
Scene_ReactorUI.prototype.beginInput(window, quiet)

A text input starts editing: typing always, the stock character grid when the node asks for it.

openCharacterGrid

method source
Scene_ReactorUI.prototype.openCharacterGrid(field)

The stock name-entry grid under the field, bound to the field's draft through a small stand-in for Window_NameEdit: its OK commits and its cancel deletes a character, as on the stock screen.

closeCharacterGrid

method source
Scene_ReactorUI.prototype.closeCharacterGrid()

Closes the character grid. (Same as the RPG Maker MZ method of this name.)

beginQuantity

method source
Scene_ReactorUI.prototype.beginQuantity(action, row, window)

Buy or sell: the stock number window over the list asks how many.

endQuantity

method source
Scene_ReactorUI.prototype.endQuantity(window)

Ends the quantity. (Same as the RPG Maker MZ method of this name.)

executeFileAction

method source
Scene_ReactorUI.prototype.executeFileAction(type, row, window)

Runs the file action. (Same as the RPG Maker MZ method of this name.)

Events, Commands & Input

onActorChange

method source
Scene_ReactorUI.prototype.onActorChange()

Called when actor change happens. (Same as the RPG Maker MZ method of this name.)

onFileFailure

method source
Scene_ReactorUI.prototype.onFileFailure(type, window, error)

Called when file failure happens. (Same as the RPG Maker MZ method of this name.)

Updating & Drawing

refreshDependents

method source
Scene_ReactorUI.prototype.refreshDependents(name)

Redraws the dependents. (Same as the RPG Maker MZ method of this name.)

refreshAllLists

method source
Scene_ReactorUI.prototype.refreshAllLists()

Every list re-reads its rows on its next update: after an item is used, equipped, bought or sold.

refreshNodeLayouts

method source
Scene_ReactorUI.prototype.refreshNodeLayouts()

Re-measures auto-sized text and repositions it and anchored descendants.

updateInterfaceTransition

method source
Scene_ReactorUI.prototype.updateInterfaceTransition()

Updates the interface transition each frame. (Same as the RPG Maker MZ method of this name.)

updateConditions

method source
Scene_ReactorUI.prototype.updateConditions()

Updates the conditions each frame. (Same as the RPG Maker MZ method of this name.)

update

method source
Scene_ReactorUI.prototype.update()

Update. (Same as the RPG Maker MZ method of this name.)

updateControlStates

method source
Scene_ReactorUI.prototype.updateControlStates()

Updates the control states each frame. (Same as the RPG Maker MZ method of this name.)

updateTouch

method source
Scene_ReactorUI.prototype.updateTouch()

Updates the touch each frame. (Same as the RPG Maker MZ method of this name.)

updateInput

method source
Scene_ReactorUI.prototype.updateInput()

Updates the input each frame. (Same as the RPG Maker MZ method of this name.)

Other

shopGoods

method source
Scene_ReactorUI.prototype.shopGoods()

Shop Processing's goods, [type, id, priceType, price] each; empty outside a shop.

sceneActor

method source
Scene_ReactorUI.prototype.sceneActor()

The actor a Name Input screen was opened for, else the menu actor.

focusedNodeId

method source
Scene_ReactorUI.prototype.focusedNodeId()

The focused control's node id, for conditions such as help text that follows focus.

pagesActors

method source
Scene_ReactorUI.prototype.pagesActors()

Roles whose Q/W (page up/down) change the menu actor, as the stock scenes do.

interfaceId

method source
Scene_ReactorUI.prototype.interfaceId()

Interface id. (Same as the RPG Maker MZ method of this name.)

context

method source
Scene_ReactorUI.prototype.context(name)

Context. (Same as the RPG Maker MZ method of this name.)

rememberForPush

method source
Scene_ReactorUI.prototype.rememberForPush()

Keeps this interface's state for when the scene pushed over it pops back; once per push.

picturesReady

method source
Scene_ReactorUI.prototype.picturesReady()

A scene opens with its pictures in place, so nothing pops in a moment later: it waits for them as it waits for the game's own images, but never more than a second, and a missing file holds nothing up.

terminate

method source
Scene_ReactorUI.prototype.terminate()

Terminate. (Same as the RPG Maker MZ method of this name.)

buttons

method source
Scene_ReactorUI.prototype.buttons()

Buttons. (Same as the RPG Maker MZ method of this name.)

focusedWindow

method source
Scene_ReactorUI.prototype.focusedWindow()

Focused window. (Same as the RPG Maker MZ method of this name.)

acceptsInput

method source
Scene_ReactorUI.prototype.acceptsInput()

Accepts input. (Same as the RPG Maker MZ method of this name.)

focusInitial

method source
Scene_ReactorUI.prototype.focusInitial()

Focus initial. (Same as the RPG Maker MZ method of this name.)

cancelClose

method source
Scene_ReactorUI.prototype.cancelClose()

Undoes a close whose next interface could not open: this one shows again and takes input.

cancelInterface

method source
Scene_ReactorUI.prototype.cancelInterface(alreadyPlayed)

Cancel interface. (Same as the RPG Maker MZ method of this name.)

commitInput

method source
Scene_ReactorUI.prototype.commitInput(window, soundPlayed)

Commit input. (Same as the RPG Maker MZ method of this name.)

cancelInput

method source
Scene_ReactorUI.prototype.cancelInput(window)

Cancel input. (Same as the RPG Maker MZ method of this name.)

reloadMapIfUpdated

method source
Scene_ReactorUI.prototype.reloadMapIfUpdated()

Reload map if updated. (Same as the RPG Maker MZ method of this name.)