-
_createContentsBackSprite
()
private
-
Creates the contents background sprite
-
_createContentsSprite
()
private
-
Creates the contents sprite
-
-
Activates the window
-
-
Clears the window
Returns true if successfully completed
Returns:
Type |
Description |
Boolean
|
Successfully completed |
-
-
Returns the height of the contents
Returns:
Type |
Description |
Number
|
Height of the contents |
-
-
Returns the width of the contents
Returns:
Type |
Description |
Number
|
Width of the contents |
-
-
Creates all objects
-
-
Creates the contents
-
-
Deactivates the window
-
-
Draws the text
Returns true if successfully completed
Name |
Type |
Default |
Description |
text |
String
|
|
Text |
options |
Object
|
{}
|
optional
Options for drawing |
-
drawTextEx
(text, options)
-
Draws the text
Name |
Type |
Default |
Description |
text |
String
|
|
Text |
options |
Object
|
{}
|
optional
Options for drawing |
- Version:
-
-
Hides the background
-
-
Hides the contents background
-
-
Hides the cursor
-
-
Hides the frame
-
initialize
(object, y, width, height)
-
Initializes a window
Name |
Type |
Description |
object |
Number
|
Graphics
|
Object
|
optional
The X coordinate or Graphics or object with parameters |
y |
Number
|
optional
The Y coordinate (if object is Number) |
width |
Number
|
optional
Width of the window (if object is Number) |
height |
Number
|
String
|
optional
Height of the window or number of lines (String) (if object is Number) |
object.x |
Number
|
optional
The X coordinate |
object.y |
Number
|
optional
The Y coordinate |
object.width |
Number
|
optional
Width of the window |
object.height |
Number
|
String
|
optional
Height of the window or number of lines (String) |
Examples
const window = new DKTools.Window(0, 0, 100, 100);
const window = new DKTools.Window(Graphics);
const window = new DKTools.Window({ x: 0, y: 0, width: 200, height: 200 });
const window = new DKTools.Window(50, 50, 400, '2');
-
isOpenAndActive
()Boolean
-
Returns true if the window is open and active
Returns:
Type |
Description |
Boolean
|
Window is open and active |
-
isOpenAndVisible
()Boolean
-
Returns true if the window is open and visible
Returns:
Type |
Description |
Boolean
|
Window is open and visible |
-
-
Loads the window skin
-
onItemChange
(item, lastItem)
-
Handles item change
Name |
Type |
Description |
item |
*
|
Item |
lastItem |
*
|
Last item |
-
-
Updates and redraws all
-
-
Resets the font settings
-
-
Resets the paint opacity of the bitmap
- Since:
-
-
Resets the text color
-
resize
(width, height, blockStart)Boolean
-
Changes the size of the window
Returns true if the change occurred
Name |
Type |
Default |
Description |
width |
Number
|
|
Width of the window |
height |
Number
|
String
|
|
Height of the window or number of lines (String) |
blockStart |
Boolean
|
false
|
optional
Blocking the call of the "start" function |
Returns:
Type |
Description |
Boolean
|
Change occurred |
-
-
Sets all parameters
Name |
Type |
Default |
Description |
object |
Object
|
{}
|
optional
Parameters
Name |
Type |
Description |
contentsWidth |
function
|
Number
|
optional
Width of the contents |
contentsHeight |
function
|
Number
|
optional
Height of the contents |
contentsSprite |
Sprite
|
optional
Contents sprite |
|
- Version:
-
setupContentsHeight
(contentsHeight)
-
Sets the height of the contents
Name |
Type |
Default |
Description |
contentsHeight |
function
|
Number
|
this.standardContentsHeight()
|
optional
Height of the contents |
-
setupContentsSprite
(contentsSprite)
-
Sets the sprite of the contents
Name |
Type |
Default |
Description |
contentsSprite |
DKTools.Sprite
|
*
|
this.standardContentsSprite()
|
optional
Contents sprite |
-
setupContentsWidth
(contentsWidth)
-
Sets the width of the contents
Name |
Type |
Default |
Description |
contentsWidth |
function
|
Number
|
this.standardContentsWidth()
|
optional
Width of the contents |
-
setupSize
(width, height)
-
Sets the size of the window
Name |
Type |
Description |
width |
Number
|
Object
|
optional
Width of the window |
height |
Number
|
String
|
optional
Height of the window or number of lines (String) |
- Version:
-
-
Returns the standard sprite of the contents
Returns:
Type |
Description |
DKTools.Sprite
|
Sprite
|
Standard sprite of the contents |
-
standardOpennessSpeed
()Number
-
Returns the standard openness speed of the window
Returns:
Type |
Description |
Number
|
Standard openness speed of the window |
-
-
Just for compatibility with MV plugins
Returns the window padding
- Since:
Returns:
Type |
Description |
Number
|
Window padding |
-
-
Updates the window
-
-
Updates all
-
-
Updates the closing of the window
- Version:
-
-
Updates the events with type: close
-
-
Updates the contents
-
-
Updates the opening of the window
- Version:
-
-
Updates the events with type: open