The window background color.
The window font color.
The x world position in px.
The y world position in px.
The x position relative to camera in px.
The y position relative to camera in px.
Adds a sprite to the main group of this window.
The sprite to be added.
Adds a sprite to an internal group.
The internal group key.
The sprite to be added.
True if the sprite was successfully added, false otherwise.
Brings the border graphics to top position in window group.
If text tween was set when using Window.tween_text_horizontally, this function can stop and destroy it.
Removes existing separator graphics.
Closes this window.
Callback function.
Plays a fading animation if true.
Creates a new sprite in the main group of this window.
the x position of the sprite.
the y position of the sprite.
the sprite key name.
some optional options.
The color of the sprite (tint property).
The sprite frame name.
The internal group key in the case the sprite should be added in an internal group.
Returns the added sprite.
Creates an internal group. A internal group is a Phaser.Group that can be retrieved by a key and is used to attach other sprites to this window.
The group's key.
The position object of the internal group.
Returns the internal group.
Destroys this window.
Plays a fading animation if true.
Callback function.
Destroy all internal groups of this window.
Destroys an internal group and its elements.
The internal group key.
Destroys a given text object.
The text obj. to be destroyed.
Creates the window background. Fills the window's space with the window color.
Draws the window borders. Lines are drawn to create the borders, including corners. Colors used: 0xFFFFFF = White, 0xA5A5A5 = Gray (Lighter), 0x525252 = Gray (Darker), 0x111111 = Black.
Draws separator graphics in the window. These are created by changing the brightness of the background.
Initial x line separator position.
Initial y line separator position.
Final x line separator position.
Final y line separator position.
if true, the separator is a vertical line, otherwise horizontal.
Returns an internal group.
The internal group key.
Returns an internal group.
Initializes the waving borders of the mind read window.
Creates in this window an item object. An item object is a internal window group that contains the item icon, the item quantity, the graphics for a broken item, the equip graphics indication and the item background graphics (like in shops).
the item key name.
the item object position.
some optional parameters.
Whether this item obj. has a background graphics (like in shops).
Whether this item obj. should show the broken item graphics.
Whether the icon positioning should be relative to item obj. center.
Whether this item obj. should show the equipped indication graphics.
The window internal group key. If using params arg, this key must be passed.
Shows the quatity indicator graphics if the given quantity is bigger than 1.
returns the item object.
Moves an item object in the window.
The item object.
The coordinates of the new position.
Removes a sprite from the main group of this window.
The sprite to be removed.
If true, the sprite is destroyed.
list of sprites that won't be destroyed.
Resets a text object to default position.
The text object.
Whether the text object is in italic.
Sends this window to the front of the screen.
Will update this window position in respect to canvas instead of camera.
Sets a text in a dialog manner in this window.
The text lines (array of string).
some optional parameters.
Whether the text is displayed in a animated manner.
The font color. Can be an array of colors the indicates for each letter.
Whether the text is in italic.
The x internal padding text position.
The y internal padding text position.
Specific points to pause/delay the dialog. Each array item represents a line. An item is an object containing the follow key:value -> line_letter_index:duration_ms. The duration is in ms.
A custom value for the space between text lines.
A callback the is called whenever a word is displayed in the window when animate is true.
Returns a promise that is resolved on animation finish.
Sets in this window lines of text.
An array of strings containing the texts.
Some optional parameters.
Returns an array of TextObjs that were inserted.
Creates a sprite to represent a text at a given location.
The text to display.
The desired x postion. If not passed, default value will be assumed.
The desired y postion. If not passed, default value will be assumed.
Some optional parameters.
The text's desired color
If this exists, the text will belong to that group.
If true, the text will be centered.
If true, the text will be italic.
If true, the text will be right-aligned.
If true, gives the text a background shape.
Returns the resulting text object.
Sets the visibility of a given text object.
The visibility state.
The text obj.
Displays this window.
on window show callback.
If true, plays an opening animation.
on window close callback.
Tweens the text horizontally back and forth. Use this when you expect the text to be bigger than the window.
The text object to be tweened.
the x postition destination.
The tween duration.
Return the tween object.
Updates the window position if necessary.
Updates the waving borders of the mind read window.
Changes the window's position.
The position's parameters.
If true, moves the window by the x and y offset values.
Changes the window's size and redraws it.
The new width and height parameters.
Changes the text of a text object.
The new text to show.
The text object to be updated.
Changes the color of the given text object.
The new color to set.
The text obj.
Changes the position of the given text object.
The desired position object.
The text object to move repositioned.
Generated using TypeDoc
A basic window template used in most menus. Creates the background and borders. Supports the addition of sprites, texts, and custom groups. Supports pagination indication, text manipulation and also icons positioning.