Namespace in reactor_ui.js

Window_ReactorUINode

48 functions in 6 groups · hide internal

Designing a custom interface.

Familiar territory. Window_ReactorUINode 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 1

initialize() Sets up a new instance.

Getting Information 2

currentText() The node's text with escape codes resolved, as the game shows it now.
measure() Natural size of an auto-sized text node.

Checks (True / False) 4

isFocusable() Whether it is focusable.
isEnabled() Whether it is enabled.
isEditing() Whether it is editing.
containsPoint() Contains point.

Actions 15

setEnabled() Sets the enabled.
setFocused() Sets the focused.
setPressed() Sets the pressed.
applyMotionPose() Applies the motion pose.
placeCarried() Places the windows this one carries, after it has moved.
showPictureSprite() An Image node with frames or drift shows its picture in a sprite inside the window, so a frame is a change of…
resetFontSettings() Resets the font settings.
applyFit() "Fit text to size": finds the largest font scale (never above 1) at which the label fits every authored dimen…
requestBitmap() Requests the bitmap.
beginEdit() Begin edit.
setDraft() Sets the draft.
endEdit() Ends the edit; commit writes the draft and returns true when it was taken.
openDomInput() Opens the dom input.
closeDomInput() Closes the dom input.
destroy() Destroy.

Updating & Drawing 16

updatePadding() Updates the padding each frame.
updateBackOpacity() Updates the back opacity each frame.
syncVisualState() Sync visual state.
updateMotion() One game update of a shown, moving node.
updatePictureSprite() Updates the picture sprite each frame.
refresh() Refresh.
drawInput() Draws the input.
drawGauge() A gauge node hosts the engine's own gauge sprite, sized to the node.
drawPictureFill() Fill "picture": the node's picture (a control's by its state) behind its contents; nothing when it is missing.
drawSurface() Draws the surface.
drawBorder() Draws the border.
drawImage() Draws the image.
drawLabel() Draws the label.
drawFocus() Draws the focus.
update() Update.
updateShown() The node's per-frame work: what it shows is compared with the game and redrawn when it differs.

Other 10

node() Node.
usesSkin() Uses skin.
controlState() Control state.
restartMotion() Shown again (or for the first time): Appear starts over.
convertEscapeCharacters() Party codes resolve before the stock codes, for drawing and measuring alike.
labelValue() Label value.
fitLine() "Fit text to size" for one plain line (an input's value): shrinks the font until it fits the width.
labelText() The node's text, word-wrapped to the node width when asked to.
wrapText() Greedy word wrap measured through textSizeEx, so escape codes, icons, and size changes count exactly as they…
inputValue() The text the field holds now: its draft while editing, else the stored value.

Setup & Creation

initialize

method source
Window_ReactorUINode.prototype.initialize(rect, scene, node)

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

Getting Information

currentText

method source
Window_ReactorUINode.prototype.currentText()

The node's text with escape codes resolved, as the game shows it now.

measure

method source
Window_ReactorUINode.prototype.measure()

Natural size of an auto-sized text node.

Checks (True / False)

isFocusable

method source
Window_ReactorUINode.prototype.isFocusable()

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

isEnabled

method source
Window_ReactorUINode.prototype.isEnabled()

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

isEditing

method source
Window_ReactorUINode.prototype.isEditing()

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

containsPoint

method source
Window_ReactorUINode.prototype.containsPoint(x, y)

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

Actions

setEnabled

method source
Window_ReactorUINode.prototype.setEnabled(enabled)

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

setFocused

method source
Window_ReactorUINode.prototype.setFocused(focused)

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

setPressed

method source
Window_ReactorUINode.prototype.setPressed(pressed)

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

applyMotionPose

method source
Window_ReactorUINode.prototype.applyMotionPose(baseX, baseY, angle, opacity)

Applies the motion pose. (Same as the RPG Maker MZ method of this name.)

placeCarried

method source
Window_ReactorUINode.prototype.placeCarried()

Places the windows this one carries, after it has moved.

showPictureSprite

method source
Window_ReactorUINode.prototype.showPictureSprite(bitmap)

An Image node with frames or drift shows its picture in a sprite inside the window, so a frame is a change of the sprite's frame and a drift a change of its origin: the window's bitmap is not painted.

resetFontSettings

method source
Window_ReactorUINode.prototype.resetFontSettings()

Resets the font settings. (Same as the RPG Maker MZ method of this name.)

applyFit

method source
Window_ReactorUINode.prototype.applyFit()

"Fit text to size": finds the largest font scale (never above 1) at which the label fits every authored dimension of the node, and leaves it in _uiFontScale for resetFontSettings.

Details

"Fit text to size": finds the largest font scale (never above 1) at which the label fits every authored dimension of the node, and leaves it in _uiFontScale for resetFontSettings. Wrapping re-flows at each candidate size, so a wrapped paragraph shrinks until its lines fit the height, and an unwrapped line shrinks until it fits the width.

requestBitmap

method source
Window_ReactorUINode.prototype.requestBitmap()

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

beginEdit

method source
Window_ReactorUINode.prototype.beginEdit()

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

setDraft

method source
Window_ReactorUINode.prototype.setDraft(text)

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

endEdit

method source
Window_ReactorUINode.prototype.endEdit(commit)

Ends the edit; commit writes the draft and returns true when it was taken.

openDomInput

method source
Window_ReactorUINode.prototype.openDomInput()

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

closeDomInput

method source
Window_ReactorUINode.prototype.closeDomInput()

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

destroy

method source
Window_ReactorUINode.prototype.destroy(options)

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

Updating & Drawing

updatePadding

method source
Window_ReactorUINode.prototype.updatePadding()

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

updateBackOpacity

method source
Window_ReactorUINode.prototype.updateBackOpacity()

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

syncVisualState

method source
Window_ReactorUINode.prototype.syncVisualState()

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

updateMotion

method source
Window_ReactorUINode.prototype.updateMotion()

One game update of a shown, moving node.

updatePictureSprite

method source
Window_ReactorUINode.prototype.updatePictureSprite()

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

refresh

method source
Window_ReactorUINode.prototype.refresh()

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

drawInput

method source
Window_ReactorUINode.prototype.drawInput()

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

drawGauge

method source
Window_ReactorUINode.prototype.drawGauge()

A gauge node hosts the engine's own gauge sprite, sized to the node.

drawPictureFill

method source
Window_ReactorUINode.prototype.drawPictureFill()

Fill "picture": the node's picture (a control's by its state) behind its contents; nothing when it is missing.

drawSurface

method source
Window_ReactorUINode.prototype.drawSurface()

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

drawBorder

method source
Window_ReactorUINode.prototype.drawBorder(bitmap, color, width)

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

drawImage

method source
Window_ReactorUINode.prototype.drawImage()

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

drawLabel

method source
Window_ReactorUINode.prototype.drawLabel()

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

drawFocus

method source
Window_ReactorUINode.prototype.drawFocus()

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

update

method source
Window_ReactorUINode.prototype.update()

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

updateShown

method source
Window_ReactorUINode.prototype.updateShown()

The node's per-frame work: what it shows is compared with the game and redrawn when it differs.

Other

node

method source
Window_ReactorUINode.prototype.node()

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

usesSkin

method source
Window_ReactorUINode.prototype.usesSkin()

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

controlState

method source
Window_ReactorUINode.prototype.controlState()

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

restartMotion

method source
Window_ReactorUINode.prototype.restartMotion()

Shown again (or for the first time): Appear starts over.

convertEscapeCharacters

method source
Window_ReactorUINode.prototype.convertEscapeCharacters(text)

Party codes resolve before the stock codes, for drawing and measuring alike.

labelValue

method source
Window_ReactorUINode.prototype.labelValue()

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

fitLine

method source
Window_ReactorUINode.prototype.fitLine(line, maxWidth)

"Fit text to size" for one plain line (an input's value): shrinks the font until it fits the width.

labelText

method source
Window_ReactorUINode.prototype.labelText()

The node's text, word-wrapped to the node width when asked to.

wrapText

method source
Window_ReactorUINode.prototype.wrapText(text, width)

Greedy word wrap measured through textSizeEx, so escape codes, icons, and size changes count exactly as they draw.

Details

Greedy word wrap measured through textSizeEx, so escape codes, icons, and size changes count exactly as they draw. Authored line breaks are kept.

inputValue

method source
Window_ReactorUINode.prototype.inputValue()

The text the field holds now: its draft while editing, else the stored value.