Class: Window

Window

new Window()

The window in the game.

Extends

  • PIXI.Container

Members

activeboolean

The active state for the window

backOpacitynumber

The opacity of the window background (0 to 255)

contentsBitmap

The bitmap used for the window contents

contentsBackBitmap

The bitmap used for the window contents background

contentsOpacitynumber

The opacity of the window contents (0 to 255)

cursorVisibleboolean

The visibility of the cursor

downArrowVisibleboolean

The visibility of the down scroll arrow

frameVisibleboolean

The visibility of the frame

heightnumber

The height of the window in pixels

innerHeightnumberreadonly

The height of the content area in pixels

innerRectRectanglereadonly

The rectangle of the content area

innerWidthnumberreadonly

The width of the content area in pixels

marginnumber

The size of the margin for the window background

opacitynumber

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

opennessnumber

The openness of the window (0 to 255)

originPoint

The origin point of the window for scrolling

paddingnumber

The size of the padding between the frame and contents

pauseboolean

The visibility of the pause sign

upArrowVisibleboolean

The visibility of the up scroll arrow

widthnumber

The width of the window in pixels

windowskinBitmap

The image used as a window skin

Methods

addChildToBack(child)object

Adds a child between the background and contents
NameTypeDescription
childobjectThe child to add
Returns:
TypeDescription
objectThe child that was added

addInnerChild(child)object

Adds a child to the client area
NameTypeDescription
childobjectThe child to add
Returns:
TypeDescription
objectThe child that was added

destroy()

Destroys the window

drawShape()

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

initialize()

Initializes the window

isClosed()boolean

Checks whether the window is completely closed (openness == 0)
Returns:
TypeDescription
booleanTrue if the window is closed

isOpen()boolean

Checks whether the window is completely open (openness == 255)
Returns:
TypeDescription
booleanTrue if the window is open

move(x, y, width, height)

Sets the x, y, width, and height of the window
NameTypeDescription
xnumberThe new x coordinate of the window
ynumberThe new y coordinate of the window
widthnumberThe new width of the window
heightnumberThe new height of the window

moveCursorBy(x, y)

Moves the cursor position by the given amount
NameTypeDescription
xnumberThe amount of horizontal movement
ynumberThe amount of vertical movement

moveInnerChildrenBy(x, y)

Moves the inner children by the given amount
NameTypeDescription
xnumberThe amount of horizontal movement
ynumberThe amount of vertical movement

setCursorRect(x, y, width, height)

Sets the position of the command cursor
NameTypeDescription
xnumberThe x coordinate of the cursor
ynumberThe y coordinate of the cursor
widthnumberThe width of the cursor
heightnumberThe height of the cursor

setTone(r, g, b)

Changes the color of the background
NameTypeDescription
rnumberThe red value in the range (-255, 255)
gnumberThe green value in the range (-255, 255)
bnumberThe blue value in the range (-255, 255)
Updates the window for each frame

updateTransform()

Updates the transform on all children of this container for rendering