Class in reactor_core_display.js

Window

15 public functions in 5 groups · show internal (_) functions

The Database: everything Core loads at boot.

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

The window in the game.

@class
@extends
PIXI.Container
function Window()

Quick Reference

Setup & Creation 1

initialize() Sets up a new instance.

Checks (True / False) 2

isOpen() Checks whether the window is completely open (openness == 255).
isClosed() Checks whether the window is completely closed (openness == 0).

Actions 8

destroy() Destroys the window.
move() Sets the x, y, width, and height all at once.
setCursorRect() Sets the position of the command cursor.
moveCursorBy() Moves the cursor position by the given amount.
moveInnerChildrenBy() Moves the inner children by the given amount.
setTone() Changes the color of the background.
addChildToBack() Adds a child between the background and contents.
addInnerChild() Adds a child to the client area.

Updating & Drawing 3

update() Updates the window for each frame.
updateTransform() Updates the transform on all children of this container for rendering.
drawShape() Draws the window shape into PIXI.Graphics object.

Other 1

defaultMargin() System.json advanced.windowMargin (a 2003 window has none); 4 when the data is not loaded.

Setup & Creation

initialize

method source
Window.prototype.initialize()

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

Checks (True / False)

isOpen

method source
Window.prototype.isOpen()

Checks whether the window is completely open (openness == 255).

Details

Checks whether the window is completely open (openness == 255).

@returns
boolean True if the window is open.

isClosed

method source
Window.prototype.isClosed()

Checks whether the window is completely closed (openness == 0).

Details

Checks whether the window is completely closed (openness == 0).

@returns
boolean True if the window is closed.

Actions

destroy

method source
Window.prototype.destroy()

Destroys the window.

move

method source
Window.prototype.move(x, y, width, height)

Sets the x, y, width, and height all at once.

Details

Sets the x, y, width, and height all at once.

@param
x number The x coordinate of the window.
@param
y number The y coordinate of the window.
@param
width number The width of the window.
@param
height number The height of the window.

setCursorRect

method source
Window.prototype.setCursorRect(x, y, width, height)

Sets the position of the command cursor.

Details

Sets the position of the command cursor.

@param
x number The x coordinate of the cursor.
@param
y number The y coordinate of the cursor.
@param
width number The width of the cursor.
@param
height number The height of the cursor.

moveCursorBy

method source
Window.prototype.moveCursorBy(x, y)

Moves the cursor position by the given amount.

Details

Moves the cursor position by the given amount.

@param
x number The amount of horizontal movement.
@param
y number The amount of vertical movement.

moveInnerChildrenBy

method source
Window.prototype.moveInnerChildrenBy(x, y)

Moves the inner children by the given amount.

Details

Moves the inner children by the given amount.

@param
x number The amount of horizontal movement.
@param
y number The amount of vertical movement.

setTone

method source
Window.prototype.setTone(r, g, b)

Changes the color of the background.

Details

Changes the color of the background.

@param
r number The red value in the range (-255, 255).
@param
g number The green value in the range (-255, 255).
@param
b number The blue value in the range (-255, 255).

addChildToBack

method source
Window.prototype.addChildToBack(child)

Adds a child between the background and contents.

Details

Adds a child between the background and contents.

@param
child object The child to add.
@returns
object The child that was added.

addInnerChild

method source
Window.prototype.addInnerChild(child)

Adds a child to the client area.

Details

Adds a child to the client area.

@param
child object The child to add.
@returns
object The child that was added.

Updating & Drawing

update

method source
Window.prototype.update()

Updates the window for each frame.

updateTransform

method source
Window.prototype.updateTransform()

Updates the transform on all children of this container for rendering.

drawShape

method source
Window.prototype.drawShape(graphics)

Draws the window shape into PIXI.Graphics object.

Details

Draws the window shape into PIXI.Graphics object. Used by WindowLayer.

Other

defaultMargin

static source
Window.defaultMargin()

System.json advanced.windowMargin (a 2003 window has none); 4 when the data is not loaded.