Window Class
The window in the game.
Constructor
Window ()
Item Index
Methods PropertiesMethods
addChild ( child ) Object
Adds a child to the container.
Parameters:
-
child
ObjectThe child to add
Returns:
Object:
The child that was added
addChildAt ( child index ) Object
Adds a child to the container.
Parameters:
-
child
ObjectThe child to add
-
index
NumberThe index to place the child in
Returns:
Object:
The child that was added
addChildToBack ( child ) Object
Adds a child between the background and contents.
Parameters:
-
child
ObjectThe child to add
Returns:
Object:
The child that was added
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:
-
x
NumberThe x coordinate of the window
-
y
NumberThe y coordinate of the window
-
width
NumberThe width of the window
-
height
NumberThe height of the window
removeChild ( child ) Object
Removes a child from the container.
Parameters:
-
child
ObjectThe child to remove
Returns:
Object:
The child that was removed
removeChildAt ( index ) Object
Removes a child from the specified index position.
Parameters:
-
index
NumberThe index to get the child from
Returns:
Object:
The child that was removed
setCursorRect ( x , y , width , height )
Sets the position of the command cursor.
Parameters:
-
x
NumberThe x coordinate of the cursor
-
y
NumberThe y coordinate of the cursor
-
width
NumberThe width of the cursor
-
height
NumberThe height of the cursor
setTone ( r , g , b )
Changes the color of the background.
Parameters:
-
r
NumberThe red value in the range (-255, 255)
-
g
NumberThe green value in the range (-255, 255)
-
b
NumberThe blue value in the range (-255, 255)
Returns:
update ()
Updates the window for each frame.
Properties
active Boolean
The active state for the window.
backOpacity Number
The opacity of the window contents (0 to 255).
children Array
[read-only] The array of children of the window.
contents Bitmap
contentsOpacity Number
The opacity of the window contents (0 to 255).
downArrowVisible Number
The opacity of the window contents (0 to 255).
height Number
The height of the window 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.
parent Object
[read-only] The object that contains the window.
pause Boolean
The visibility of the pause sign.
upArrowVisible Boolean
The visibility of the up scroll arrow.
visible Boolean
The visibility of the window.
width Number
The width of the window in pixels.
windowskin Bitmap
The image used as a window skin.
x Number
The x coordinate of the window.
y Number
The y coordinate of the window.