Class: Window

Window

new Window ()

The window in the game.

Extends

  • PIXI.Container

Members

active boolean

The active state for the window.

backOpacity number

The opacity of the window background (0 to 255).

contents Bitmap

The bitmap used for the window contents.

contentsBack Bitmap

The bitmap used for the window contents background.

contentsOpacity number

The opacity of the window contents (0 to 255).

cursorVisible boolean

The visibility of the cursor.

downArrowVisible boolean

The visibility of the down scroll arrow.

frameVisible boolean

The visibility of the frame.

height number

The height of the window in pixels.

innerHeight number readonly

The height of the content area in pixels.

innerRect Rectangle readonly

The rectangle of the content area.

innerWidth number readonly

The width of the content area in pixels.

margin number

The size of the margin for the window background.

opacity number

The opacity of the window without contents (0 to 255).

openness number

The openness of the window (0 to 255).

origin Point

The origin point of the window for scrolling.

padding number

The size of the padding between the frame and contents.

pause boolean

The visibility of the pause sign.

upArrowVisible boolean

The visibility of the up scroll arrow.

width number

The width of the window in pixels.

windowskin Bitmap

The image used as a window skin.

Methods

addChildToBack (child)object

Adds a child between the background and contents.

Name Type Description
child object

The child to add.

Returns:
Type Description
object The child that was added.

addInnerChild (child)object

Adds a child to the client area.

Name Type Description
child object

The child to add.

Returns:
Type Description
object The child that was added.

destroy ()

Destroys the window.

drawShape ()

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

isClosed ()boolean

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

Returns:
Type Description
boolean True if the window is closed.

isOpen ()boolean

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

Returns:
Type Description
boolean True if the window is open.

move (x, y, width, height)

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

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.

moveCursorBy (x, y)

Moves the cursor position by the given amount.

Name Type Description
x number

The amount of horizontal movement.

y number

The amount of vertical movement.

moveInnerChildrenBy (x, y)

Moves the inner children by the given amount.

Name Type Description
x number

The amount of horizontal movement.

y number

The amount of vertical movement.

setCursorRect (x, y, width, height)

Sets the position of the command cursor.

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.

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.

updateTransform ()

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