Private _colorPrivate _font_Private _groupPrivate _heightPrivate _mind_Private _mind_Private _mind_Private _openPrivate _page_Private _text_Private _widthPrivate _xPrivate _yPrivate bg_Private border_Private canvas_Private close_Private extra_Private gamePrivate internal_Private separators_Static Private Readonly BG_Static Private Readonly DEFAULT_Static Private Readonly ITEM_Static Private Readonly MIND_Static Private Readonly MIND_Static Readonly MIND_Static Private Readonly MIND_Static Private Readonly MIND_Static Private Readonly MIND_Static Private Readonly TRANSITION_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.
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.
Optional options: { some optional options.
Optional color?: numberThe color of the sprite (tint property).
Optional frame?: stringThe sprite frame name.
Optional internal_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.
Optional x?: numberOptional y?: numberReturns the internal group.
Destroys a given text object.
The text obj. to be destroyed.
Private draw_Private draw_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.
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.
Optional pos: { the item object position.
Optional params: { some optional parameters.
Optional bg?: booleanWhether this item obj. has a background graphics (like in shops).
Optional broken?: booleanWhether this item obj. should show the broken item graphics.
Optional center?: booleanWhether the icon positioning should be relative to item obj. center.
Optional equipped?: booleanWhether this item obj. should show the equipped indication graphics.
The window internal group key. If using params arg, this key must be passed.
Optional quantity?: numberShows 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.
Optional sprite: BitmapText | Sprite | Group | GraphicsThe sprite to be removed.
If true, the sprite is destroyed.
Optional exception_list: (BitmapText | Sprite | Group | Graphics)[]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.
Sets a text in a dialog manner in this window.
The text lines (array of string).
Optional options: { some optional parameters.
Optional animate?: booleanWhether the text is displayed in a animated manner.
Optional colors?: number | number[][]The font color. Can be an array of colors the indicates for each letter.
Optional italic?: booleanWhether the text is in italic.
Optional padding_The x internal padding text position.
Optional padding_The y internal padding text position.
Optional pauses?: { 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.
Optional space_A custom value for the space between text lines.
Optional word_A callback the is called whenever a word is displayed in the window when animate is true.
Optional word: stringOptional current_text: stringOptional word_index: numberReturns a promise that is resolved on animation finish.
Sets in this window lines of text.
An array of strings containing the texts.
Optional options: { 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.
Optional x_pos: numberThe desired x postion. If not passed, default value will be assumed.
Optional y_pos: numberThe desired y postion. If not passed, default value will be assumed.
Optional options: { Some optional parameters.
Optional color?: numberThe text's desired color
Optional internal_If this exists, the text will belong to that group.
Optional is_If true, the text will be centered.
Optional italic?: booleanIf true, the text will be italic.
Optional right_If true, the text will be right-aligned.
Optional with_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.
Optional show_callback: (() => void)on window show callback.
If true, plays an opening animation.
Optional close_callback: (() => void)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.
Changes the window's position.
The position's parameters.
Optional x?: numberOptional y?: numberIf true, moves the window by the x and y offset values.
Changes the text of a text object.
The new text to show.
The text object to be updated.
Optional color: numberChanges 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.
Optional x?: numberOptional y?: numberThe text object to move repositioned.
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.