Class in reactor_windows.js

Window_Base

77 public functions in 7 groups · show internal (_) functions

Windows draw every menu, list and status panel.

Familiar territory. Window_Base 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 8

initialize() Sets up a new instance.
loadWindowskin() Loads the windowskin.
createContents() Creates the contents.
createTextState() Creates the text state.
createTextBuffer() Creates the text buffer.
makeFontBigger() Makes the font bigger.
makeFontSmaller() Makes the font smaller.
createDimmerSprite() Creates the dimmer sprite.

Getting Information 7

itemWidth() Item width.
itemHeight() Item height.
itemPadding() Item padding.
textWidth() Text width.
textSizeEx() Text size ex.
calcTextHeight() Calculates the text height.
maxFontSizeInLine() The maximum font size in line.

Checks (True / False) 3

isPoolHidden() Whether a resource pool is turned off for the project (System.json rrPoolsOff, Database > System 1 > Options)…
isOpening() Whether it is opening.
isClosing() Whether it is closing.

Actions 19

destroy() Destroy.
destroyContents() Destroy contents.
resetFontSettings() Resets the font settings.
resetTextColor() Resets the text color.
open() Open.
close() Close.
show() Show.
hide() Hide.
activate() Activate.
deactivate() Deactivate.
changeTextColor() Changes the text color.
changeOutlineColor() Changes the outline color.
changePaintOpacity() Changes the paint opacity.
setBackgroundType() Sets the background type.
showBackgroundDimmer() Shows the background dimmer.
hideBackgroundDimmer() Hides the background dimmer.
playCursorSound() Plays the cursor sound.
playOkSound() Plays the ok sound.
playBuzzerSound() Plays the buzzer sound.

Events, Commands & Input 7

processAllText() Handles the all text.
processCharacter() Handles the character.
processControlCharacter() Handles the control character.
processNewLine() Handles the new line.
processEscapeCharacter() Handles the escape character.
processColorChange() Handles the color change.
processDrawIcon() Handles the draw icon.

Updating & Drawing 17

updatePadding() Updates the padding each frame.
updateBackOpacity() Updates the back opacity each frame.
updateTone() Updates the tone each frame.
update() Update.
updateOpen() Updates the open each frame.
updateClose() Updates the close each frame.
drawRect() Draws the rect.
drawText() Draws the text.
drawTextEx() Draws the text ex.
drawIcon() Draws the icon.
drawItemName() Draws the item name.
drawCurrencyValue() Draws the currency value.
updateBackgroundDimmer() Updates the background dimmer each frame.
refreshDimmerBitmap() Redraws the dimmer bitmap.
drawLegacyValue() "HP 40/ 40": the label, then current and maximum right-aligned in digits 6 px cells around a slash.
drawLegacyState() The state that shows, in its own color, or the Normal term.
drawLegacyLevel() "L 1": the level term and the level right-aligned in the next 24 px.

Other 16

checkRectObject() Check rect object.
lineHeight() Line height.
baseTextRect() Base text rect.
fittingHeight() Fitting height.
contentsWidth() Contents width.
contentsHeight() Contents height.
systemColor() System color.
translucentOpacity() Translucent opacity.
flushTextState() Flush text state.
convertEscapeCharacters() Convert escape characters.
actorName() Actor name.
partyMemberName() Party member name.
obtainEscapeCode() Obtain escape code.
obtainEscapeParam() Obtain escape param.
rrCharacterCell() The cell of a character sheet a window shows: the character standing, facing down.
rrAdvanced() Import-only window settings (System.json advanced; an MV or MZ project has none, so these methods behave as s…

Setup & Creation

initialize

method source
Window_Base.prototype.initialize(rect)

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

loadWindowskin

method source
Window_Base.prototype.loadWindowskin()

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

createContents

method source
Window_Base.prototype.createContents()

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

createTextState

method source
Window_Base.prototype.createTextState(text, x, y, width)

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

createTextBuffer

method source
Window_Base.prototype.createTextBuffer(rtl)

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

makeFontBigger

method source
Window_Base.prototype.makeFontBigger()

Makes the font bigger. (Same as the RPG Maker MZ method of this name.)

makeFontSmaller

method source
Window_Base.prototype.makeFontSmaller()

Makes the font smaller. (Same as the RPG Maker MZ method of this name.)

createDimmerSprite

method source
Window_Base.prototype.createDimmerSprite()

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

Getting Information

itemWidth

method source
Window_Base.prototype.itemWidth()

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

itemHeight

method source
Window_Base.prototype.itemHeight()

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

itemPadding

method source
Window_Base.prototype.itemPadding()

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

textWidth

method source
Window_Base.prototype.textWidth(text)

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

textSizeEx

method source
Window_Base.prototype.textSizeEx(text)

Text size ex. (Same as the RPG Maker MZ method of this name.)

calcTextHeight

method source
Window_Base.prototype.calcTextHeight(textState)

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

maxFontSizeInLine

method source
Window_Base.prototype.maxFontSizeInLine(line)

The maximum font size in line. (Same as the RPG Maker MZ method of this name.)

Checks (True / False)

isPoolHidden

method source
Window_Base.prototype.isPoolHidden(key)

Whether a resource pool is turned off for the project (System.json rrPoolsOff, Database > System 1 > Options): its gauge, value and battle-log line are not drawn.

Details

Whether a resource pool is turned off for the project (System.json rrPoolsOff, Database > System 1 > Options): its gauge, value and battle-log line are not drawn. HP is never off.

isOpening

method source
Window_Base.prototype.isOpening()

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

isClosing

method source
Window_Base.prototype.isClosing()

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

Actions

destroy

method source
Window_Base.prototype.destroy(options)

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

destroyContents

method source
Window_Base.prototype.destroyContents()

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

resetFontSettings

method source
Window_Base.prototype.resetFontSettings()

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

resetTextColor

method source
Window_Base.prototype.resetTextColor()

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

open

method source
Window_Base.prototype.open()

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

close

method source
Window_Base.prototype.close()

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

show

method source
Window_Base.prototype.show()

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

hide

method source
Window_Base.prototype.hide()

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

activate

method source
Window_Base.prototype.activate()

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

deactivate

method source
Window_Base.prototype.deactivate()

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

changeTextColor

method source
Window_Base.prototype.changeTextColor(color, paletteIndex = null)

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

changeOutlineColor

method source
Window_Base.prototype.changeOutlineColor(color, paletteShadow = false)

Changes the outline color. (Same as the RPG Maker MZ method of this name.)

changePaintOpacity

method source
Window_Base.prototype.changePaintOpacity(enabled)

Changes the paint opacity. (Same as the RPG Maker MZ method of this name.)

setBackgroundType

method source
Window_Base.prototype.setBackgroundType(type)

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

showBackgroundDimmer

method source
Window_Base.prototype.showBackgroundDimmer()

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

hideBackgroundDimmer

method source
Window_Base.prototype.hideBackgroundDimmer()

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

playCursorSound

method source
Window_Base.prototype.playCursorSound()

Plays the cursor sound. (Same as the RPG Maker MZ method of this name.)

playOkSound

method source
Window_Base.prototype.playOkSound()

Plays the ok sound. (Same as the RPG Maker MZ method of this name.)

playBuzzerSound

method source
Window_Base.prototype.playBuzzerSound()

Plays the buzzer sound. (Same as the RPG Maker MZ method of this name.)

Events, Commands & Input

processAllText

method source
Window_Base.prototype.processAllText(textState)

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

processCharacter

method source
Window_Base.prototype.processCharacter(textState)

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

processControlCharacter

method source
Window_Base.prototype.processControlCharacter(textState, c)

Handles the control character. (Same as the RPG Maker MZ method of this name.)

processNewLine

method source
Window_Base.prototype.processNewLine(textState)

Handles the new line. (Same as the RPG Maker MZ method of this name.)

processEscapeCharacter

method source
Window_Base.prototype.processEscapeCharacter(code, textState)

Handles the escape character. (Same as the RPG Maker MZ method of this name.)

processColorChange

method source
Window_Base.prototype.processColorChange(colorIndex)

Handles the color change. (Same as the RPG Maker MZ method of this name.)

processDrawIcon

method source
Window_Base.prototype.processDrawIcon(iconIndex, textState)

Handles the draw icon. (Same as the RPG Maker MZ method of this name.)

Updating & Drawing

updatePadding

method source
Window_Base.prototype.updatePadding()

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

updateBackOpacity

method source
Window_Base.prototype.updateBackOpacity()

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

updateTone

method source
Window_Base.prototype.updateTone()

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

update

method source
Window_Base.prototype.update()

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

updateOpen

method source
Window_Base.prototype.updateOpen()

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

updateClose

method source
Window_Base.prototype.updateClose()

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

drawRect

method source
Window_Base.prototype.drawRect(x, y, width, height)

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

drawText

method source
Window_Base.prototype.drawText(text, x, y, maxWidth, align)

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

drawTextEx

method source
Window_Base.prototype.drawTextEx(text, x, y, width)

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

drawIcon

method source
Window_Base.prototype.drawIcon(iconIndex, x, y)

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

drawItemName

method source
Window_Base.prototype.drawItemName(item, x, y, width)

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

drawCurrencyValue

method source
Window_Base.prototype.drawCurrencyValue(value, unit, x, y, width)

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

updateBackgroundDimmer

method source
Window_Base.prototype.updateBackgroundDimmer()

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

refreshDimmerBitmap

method source
Window_Base.prototype.refreshDimmerBitmap()

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

drawLegacyValue

method source
Window_Base.prototype.drawLegacyValue(label, value, max, x, y, digits, knockout, showMax)

"HP 40/ 40": the label, then current and maximum right-aligned in digits 6 px cells around a slash.

drawLegacyState

method source
Window_Base.prototype.drawLegacyState(actor, x, y, width)

The state that shows, in its own color, or the Normal term.

drawLegacyLevel

method source
Window_Base.prototype.drawLegacyLevel(actor, x, y)

"L 1": the level term and the level right-aligned in the next 24 px.

Other

checkRectObject

method source
Window_Base.prototype.checkRectObject(rect)

Check rect object. (Same as the RPG Maker MZ method of this name.)

lineHeight

method source
Window_Base.prototype.lineHeight()

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

baseTextRect

method source
Window_Base.prototype.baseTextRect()

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

fittingHeight

method source
Window_Base.prototype.fittingHeight(numLines)

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

contentsWidth

method source
Window_Base.prototype.contentsWidth()

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

contentsHeight

method source
Window_Base.prototype.contentsHeight()

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

systemColor

method source
Window_Base.prototype.systemColor()

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

translucentOpacity

method source
Window_Base.prototype.translucentOpacity()

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

flushTextState

method source
Window_Base.prototype.flushTextState(textState)

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

convertEscapeCharacters

method source
Window_Base.prototype.convertEscapeCharacters(text)

Convert escape characters. (Same as the RPG Maker MZ method of this name.)

actorName

method source
Window_Base.prototype.actorName(n)

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

partyMemberName

method source
Window_Base.prototype.partyMemberName(n)

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

obtainEscapeCode

method source
Window_Base.prototype.obtainEscapeCode(textState)

Obtain escape code. (Same as the RPG Maker MZ method of this name.)

obtainEscapeParam

method source
Window_Base.prototype.obtainEscapeParam(textState)

Obtain escape param. (Same as the RPG Maker MZ method of this name.)

rrCharacterCell

static source
Window_Base.rrCharacterCell(characterName, characterIndex, width, height)

The cell of a character sheet a window shows: the character standing, facing down.

Details

The cell of a character sheet a window shows: the character standing, facing down. Cut by the rules the map sprite follows (reactor_sprites.js): an [NF] sheet has N frames a row and rests on the first, where a plain sheet has three and rests on the middle one; a [1D] sheet has one row a character.

rrAdvanced

static source
Window_Base.rrAdvanced(key)

Import-only window settings (System.json advanced; an MV or MZ project has none, so these methods behave as stock): fontSizeStep how much \{ and \} change the font (VX Ace: 8 RGSS units) rrCodeLists consume the brackets of codes the runtime does not know rrNameBox { opacity, offsetX, offsetY }: a name drawn the way the game's message script drew it (Yanfly's: no window, laid over the message fram…