Class: Window

Window()

new Window()

The window in the game.
Properties:
Name Type Description
children Array [super][read-only] The array of children of the window.
parent Object [super][read-only] The object that contains the window.
active Boolean The active state for the window.
openness Number The openness of the window (0 to 255).
contents Bitmap
windowskin Bitmap The image used as a window skin.
visible Boolean The visibility of the window.
pause Boolean The visibility of the pause sign.
downArrowVisible Boolean The visibility of the down scroll arrow.
upArrowVisible Boolean The visibility of the up scroll arrow.
opacity Number The opacity of the window without contents (0 to 255).
backOpacity Number The opacity of the window contents (0 to 255).
contentsOpacity Number The opacity of the window contents (0 to 255).
origin Point The origin point of the window for scrolling.
x Number The x coordinate of the window.
y Number The y coordinate of the window.
width Number The width of the sprite without the scale.
height Number The height of the window in pixels.
margin Number The size of the margin for the window background.
padding Number The size of the padding between the frame and contents.
_isWindow Boolean
_windowskin Bitmap
_width Number
_height Number
_cursorRect Rectangle
_openness Number
_animationCount Number
_padding Number
_margin Number
_colorTone Array.<Number>
_windowSpriteContainer PIXI.Container
_windowBackSprite Sprite
_windowCursorSprite Sprite
_windowFrameSprite Sprite
_windowContentsSprite Sprite
_windowArrowSprites Array.<*>
_windowPauseSignSprite Sprite
_downArrowSprite Sprite
_upArrowSprite Sprite

Extends

  • PIXI.Container

Methods

addChild(child) → {Object}

[super] Adds a child to the container.
Parameters:
Name Type Description
child Object The child to add
Returns:
The child that was added
Type
Object

addChildAt(child, index) → {Object}

[super] Adds a child to the container at a specified index.
Parameters:
Name Type Description
child Object The child to add
index Number The index to place the child in
Returns:
The child that was added
Type
Object

addChildToBack(child) → {Object}

Adds a child between the background and contents.
Parameters:
Name Type Description
child Object The child to add
Returns:
The child that was added
Type
Object

initialize()

isClosed()

Returns true if the window is completely closed (openness == 0).

isOpen()

Returns true if the window is completely open (openness == 255).

move(x, y, width, height)

Sets the x, y, width, and height all at once.
Parameters:
Name Type Description
x Number The x coordinate of the window
y Number The y coordinate of the window
width Number The width of the window
height Number The height of the window

removeChild(child) → {Object}

[super] Removes a child to the container.
Parameters:
Name Type Description
child Object The child to remove
Returns:
The child that was removed
Type
Object

removeChildAt(index) → {Object}

[super] Removes a child from the specified index position.
Parameters:
Name Type Description
index Number The index to get the child from
Returns:
The child that was removed
Type
Object

setCursorRect(x, y, width, height)

Sets the position of the command cursor.
Parameters:
Name Type Description
x Number The x coordinate of the cursor
y Number The y coordinate of the cursor
width Number The width of the cursor
height Number The height of the cursor

setTone(r, g, b)

Changes the color of the background.
Parameters:
Name Type Description
r Number The red value in the range (-255, 255)
g Number The green value in the range (-255, 255)
b Number The blue value in the range (-255, 255)

update()

Updates the window for each frame.