Class: SystemWindowSkin

SystemWindowSkin

A window skin of the game

new SystemWindowSkin (json)

Name Type Description
json Object optional Json object describing the window skin
Properties:
Name Type Description
pictureID number The picture ID used for the window skin
borderTopLeft Array.<number> The top left border rect
borderTopRight Array.<number> The top right border rect
borderBotLeft Array.<number> The bot left border rect
borderBotRight Array.<number> The bot right border rect
borderLeft Array.<number> The left border rect
borderRight Array.<number> The right border rect
borderTop Array.<number> The top border rect
borderBot Array.<number> The bot border rect
background Array.<number> The background rect
backgroundSelection Array.<number> The background when window is selected rect
backgroundRepeat boolean If checked, the window skin background is repeated, if not, it's stretched
arrowEndMessage Array.<number> The arrow for end of messages rect
arrowTargetSelection Array.<number> The arrow for target selection rect
arrowUpDown Array.<number> The arrow for up and down rect
textNormal Array.<number> The normal text rect
textCritical Array.<number> The critical text rect
textHeal Array.<number> The heal text rect
textMiss Array.<number> The miss text rect

Methods

read (json)

Read the JSON associated to the window skin
Name Type Description
json Object Json object describing the window skin

updatePicture () async

Update the window skin picture ID

drawElement (r, x, y, w, h, zoom)

Draw any element of the window skin box with the cut picture
Name Type Default Description
r Array.<number> The rect source
x number The x target
y number The y target
w number r[2] optional The w target
h number r[3] optional The h target
zoom number 1.0 optional The zoom to apply of target size

drawBoxBackground (background, rect)

Draw the background box
Name Type Description
background Array.<number> The background source rect
rect Array.<number> The final box rect

drawBox (rect, selected, bordersVisible)

Draw the box
Name Type Description
rect Array.<number> The final box rect
selected boolean Indicate if the box is selected
bordersVisible boolean Indicate if the borders of the box are visible

drawArrowTarget (frame, x, y, positionResize)

Draw the arrow for targets
Name Type Description
frame number The current frame to draw
x number The x position
y number The y position
positionResize boolean Indicate if the position picture needs to be resize (resolution)

drawArrowMessage (frame, x, y)

Draw the arrow for end of messages
Name Type Description
frame number The current frame to draw
x number The x position
y number The y position

drawDamagesNumber (damage, x, y, rect, zoom)

Draw a damage number
Name Type Description
damage number The damage number to display
x number The x position
y number The y position
rect Array.<number> The source rect
zoom number The zoom to apply on damages

drawDamages (damage, x, y, isCrit, isMiss, zoom)

Draw a damage number according to the kind of damages
Name Type Description
damage number The damage number to display
x number The x position
y number The y position
isCrit boolean Indicate if the damages are a critical hit
isMiss boolean Indicate if the damages are a missed hit
zoom number The zoom to apply on damages