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 sourceWindow_Base.prototype.initialize(rect)
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
loadWindowskin
method sourceWindow_Base.prototype.loadWindowskin()
Loads the windowskin. (Same as the RPG Maker MZ method of this name.)
createContents
method sourceWindow_Base.prototype.createContents()
Creates the contents. (Same as the RPG Maker MZ method of this name.)
createTextState
method sourceWindow_Base.prototype.createTextState(text, x, y, width)
Creates the text state. (Same as the RPG Maker MZ method of this name.)
createTextBuffer
method sourceWindow_Base.prototype.createTextBuffer(rtl)
Creates the text buffer. (Same as the RPG Maker MZ method of this name.)
makeFontBigger
method sourceWindow_Base.prototype.makeFontBigger()
Makes the font bigger. (Same as the RPG Maker MZ method of this name.)
makeFontSmaller
method sourceWindow_Base.prototype.makeFontSmaller()
Makes the font smaller. (Same as the RPG Maker MZ method of this name.)
createDimmerSprite
method sourceWindow_Base.prototype.createDimmerSprite()
Creates the dimmer sprite. (Same as the RPG Maker MZ method of this name.)
Getting Information
itemWidth
method sourceWindow_Base.prototype.itemWidth()
Item width. (Same as the RPG Maker MZ method of this name.)
itemHeight
method sourceWindow_Base.prototype.itemHeight()
Item height. (Same as the RPG Maker MZ method of this name.)
itemPadding
method sourceWindow_Base.prototype.itemPadding()
Item padding. (Same as the RPG Maker MZ method of this name.)
textWidth
method sourceWindow_Base.prototype.textWidth(text)
Text width. (Same as the RPG Maker MZ method of this name.)
textSizeEx
method sourceWindow_Base.prototype.textSizeEx(text)
Text size ex. (Same as the RPG Maker MZ method of this name.)
calcTextHeight
method sourceWindow_Base.prototype.calcTextHeight(textState)
Calculates the text height. (Same as the RPG Maker MZ method of this name.)
maxFontSizeInLine
method sourceWindow_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 sourceWindow_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 sourceWindow_Base.prototype.isOpening()
Whether it is opening. (Same as the RPG Maker MZ method of this name.)
isClosing
method sourceWindow_Base.prototype.isClosing()
Whether it is closing. (Same as the RPG Maker MZ method of this name.)
Actions
destroy
method sourceWindow_Base.prototype.destroy(options)
Destroy. (Same as the RPG Maker MZ method of this name.)
destroyContents
method sourceWindow_Base.prototype.destroyContents()
Destroy contents. (Same as the RPG Maker MZ method of this name.)
resetFontSettings
method sourceWindow_Base.prototype.resetFontSettings()
Resets the font settings. (Same as the RPG Maker MZ method of this name.)
resetTextColor
method sourceWindow_Base.prototype.resetTextColor()
Resets the text color. (Same as the RPG Maker MZ method of this name.)
open
method sourceWindow_Base.prototype.open()
Open. (Same as the RPG Maker MZ method of this name.)
close
method sourceWindow_Base.prototype.close()
Close. (Same as the RPG Maker MZ method of this name.)
show
method sourceWindow_Base.prototype.show()
Show. (Same as the RPG Maker MZ method of this name.)
hide
method sourceWindow_Base.prototype.hide()
Hide. (Same as the RPG Maker MZ method of this name.)
activate
method sourceWindow_Base.prototype.activate()
Activate. (Same as the RPG Maker MZ method of this name.)
deactivate
method sourceWindow_Base.prototype.deactivate()
Deactivate. (Same as the RPG Maker MZ method of this name.)
changeTextColor
method sourceWindow_Base.prototype.changeTextColor(color, paletteIndex = null)
Changes the text color. (Same as the RPG Maker MZ method of this name.)
changeOutlineColor
method sourceWindow_Base.prototype.changeOutlineColor(color, paletteShadow = false)
Changes the outline color. (Same as the RPG Maker MZ method of this name.)
changePaintOpacity
method sourceWindow_Base.prototype.changePaintOpacity(enabled)
Changes the paint opacity. (Same as the RPG Maker MZ method of this name.)
setBackgroundType
method sourceWindow_Base.prototype.setBackgroundType(type)
Sets the background type. (Same as the RPG Maker MZ method of this name.)
showBackgroundDimmer
method sourceWindow_Base.prototype.showBackgroundDimmer()
Shows the background dimmer. (Same as the RPG Maker MZ method of this name.)
hideBackgroundDimmer
method sourceWindow_Base.prototype.hideBackgroundDimmer()
Hides the background dimmer. (Same as the RPG Maker MZ method of this name.)
playCursorSound
method sourceWindow_Base.prototype.playCursorSound()
Plays the cursor sound. (Same as the RPG Maker MZ method of this name.)
playOkSound
method sourceWindow_Base.prototype.playOkSound()
Plays the ok sound. (Same as the RPG Maker MZ method of this name.)
playBuzzerSound
method sourceWindow_Base.prototype.playBuzzerSound()
Plays the buzzer sound. (Same as the RPG Maker MZ method of this name.)
Events, Commands & Input
processAllText
method sourceWindow_Base.prototype.processAllText(textState)
Handles the all text. (Same as the RPG Maker MZ method of this name.)
processCharacter
method sourceWindow_Base.prototype.processCharacter(textState)
Handles the character. (Same as the RPG Maker MZ method of this name.)
processControlCharacter
method sourceWindow_Base.prototype.processControlCharacter(textState, c)
Handles the control character. (Same as the RPG Maker MZ method of this name.)
processNewLine
method sourceWindow_Base.prototype.processNewLine(textState)
Handles the new line. (Same as the RPG Maker MZ method of this name.)
processEscapeCharacter
method sourceWindow_Base.prototype.processEscapeCharacter(code, textState)
Handles the escape character. (Same as the RPG Maker MZ method of this name.)
processColorChange
method sourceWindow_Base.prototype.processColorChange(colorIndex)
Handles the color change. (Same as the RPG Maker MZ method of this name.)
processDrawIcon
method sourceWindow_Base.prototype.processDrawIcon(iconIndex, textState)
Handles the draw icon. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
updatePadding
method sourceWindow_Base.prototype.updatePadding()
Updates the padding each frame. (Same as the RPG Maker MZ method of this name.)
updateBackOpacity
method sourceWindow_Base.prototype.updateBackOpacity()
Updates the back opacity each frame. (Same as the RPG Maker MZ method of this name.)
updateTone
method sourceWindow_Base.prototype.updateTone()
Updates the tone each frame. (Same as the RPG Maker MZ method of this name.)
update
method sourceWindow_Base.prototype.update()
Update. (Same as the RPG Maker MZ method of this name.)
updateOpen
method sourceWindow_Base.prototype.updateOpen()
Updates the open each frame. (Same as the RPG Maker MZ method of this name.)
updateClose
method sourceWindow_Base.prototype.updateClose()
Updates the close each frame. (Same as the RPG Maker MZ method of this name.)
drawRect
method sourceWindow_Base.prototype.drawRect(x, y, width, height)
Draws the rect. (Same as the RPG Maker MZ method of this name.)
drawText
method sourceWindow_Base.prototype.drawText(text, x, y, maxWidth, align)
Draws the text. (Same as the RPG Maker MZ method of this name.)
drawTextEx
method sourceWindow_Base.prototype.drawTextEx(text, x, y, width)
Draws the text ex. (Same as the RPG Maker MZ method of this name.)
drawIcon
method sourceWindow_Base.prototype.drawIcon(iconIndex, x, y)
Draws the icon. (Same as the RPG Maker MZ method of this name.)
drawItemName
method sourceWindow_Base.prototype.drawItemName(item, x, y, width)
Draws the item name. (Same as the RPG Maker MZ method of this name.)
drawCurrencyValue
method sourceWindow_Base.prototype.drawCurrencyValue(value, unit, x, y, width)
Draws the currency value. (Same as the RPG Maker MZ method of this name.)
updateBackgroundDimmer
method sourceWindow_Base.prototype.updateBackgroundDimmer()
Updates the background dimmer each frame. (Same as the RPG Maker MZ method of this name.)
refreshDimmerBitmap
method sourceWindow_Base.prototype.refreshDimmerBitmap()
Redraws the dimmer bitmap. (Same as the RPG Maker MZ method of this name.)
drawLegacyValue
method sourceWindow_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 sourceWindow_Base.prototype.drawLegacyState(actor, x, y, width)
The state that shows, in its own color, or the Normal term.
drawLegacyLevel
method sourceWindow_Base.prototype.drawLegacyLevel(actor, x, y)
"L 1": the level term and the level right-aligned in the next 24 px.
Other
checkRectObject
method sourceWindow_Base.prototype.checkRectObject(rect)
Check rect object. (Same as the RPG Maker MZ method of this name.)
lineHeight
method sourceWindow_Base.prototype.lineHeight()
Line height. (Same as the RPG Maker MZ method of this name.)
baseTextRect
method sourceWindow_Base.prototype.baseTextRect()
Base text rect. (Same as the RPG Maker MZ method of this name.)
fittingHeight
method sourceWindow_Base.prototype.fittingHeight(numLines)
Fitting height. (Same as the RPG Maker MZ method of this name.)
contentsWidth
method sourceWindow_Base.prototype.contentsWidth()
Contents width. (Same as the RPG Maker MZ method of this name.)
contentsHeight
method sourceWindow_Base.prototype.contentsHeight()
Contents height. (Same as the RPG Maker MZ method of this name.)
systemColor
method sourceWindow_Base.prototype.systemColor()
System color. (Same as the RPG Maker MZ method of this name.)
translucentOpacity
method sourceWindow_Base.prototype.translucentOpacity()
Translucent opacity. (Same as the RPG Maker MZ method of this name.)
flushTextState
method sourceWindow_Base.prototype.flushTextState(textState)
Flush text state. (Same as the RPG Maker MZ method of this name.)
convertEscapeCharacters
method sourceWindow_Base.prototype.convertEscapeCharacters(text)
Convert escape characters. (Same as the RPG Maker MZ method of this name.)
actorName
method sourceWindow_Base.prototype.actorName(n)
Actor name. (Same as the RPG Maker MZ method of this name.)
partyMemberName
method sourceWindow_Base.prototype.partyMemberName(n)
Party member name. (Same as the RPG Maker MZ method of this name.)
obtainEscapeCode
method sourceWindow_Base.prototype.obtainEscapeCode(textState)
Obtain escape code. (Same as the RPG Maker MZ method of this name.)
obtainEscapeParam
method sourceWindow_Base.prototype.obtainEscapeParam(textState)
Obtain escape param. (Same as the RPG Maker MZ method of this name.)
rrCharacterCell
static sourceWindow_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 sourceWindow_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…