Window Class
The window in the game.
Constructor
Window ()
Item Index
Methods PropertiesMethods
addChild ( child ) Object
Adds a child to the container.
Parameters:
-
childObjectThe child to add
Returns:
Object:
The child that was added
addChildAt ( child index ) Object
Adds a child to the container.
Parameters:
-
childObjectThe child to add
-
indexNumberThe 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:
-
childObjectThe 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:
-
xNumberThe x coordinate of the window
-
yNumberThe y coordinate of the window
-
widthNumberThe width of the window
-
heightNumberThe height of the window
removeChild ( child ) Object
Removes a child from the container.
Parameters:
-
childObjectThe child to remove
Returns:
Object:
The child that was removed
removeChildAt ( index ) Object
Removes a child from the specified index position.
Parameters:
-
indexNumberThe 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:
-
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.
Parameters:
-
rNumberThe red value in the range (-255, 255)
-
gNumberThe green value in the range (-255, 255)
-
bNumberThe 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.