From 633c570557ad9a7c4716d1b1ebb6147eafc65c71 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 23 Oct 2019 18:59:01 +0800 Subject: [PATCH] relocateCanvas getContextByName --- libs/ui.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libs/ui.js b/libs/ui.js index 302e902f..fc4bb104 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -1296,7 +1296,7 @@ ui.prototype._drawScrollText_animate = function (ctx, time, callback) { if (currH < -height) { delete core.animateFrame.asyncId[animate]; clearInterval(animate); - if (core.isset(callback)) callback(); + if (callback) callback(); return; } core.drawImage('ui', ctx.canvas, 0, currH); @@ -1416,7 +1416,7 @@ ui.prototype._drawChoices_drawChoices = function (choices, isWindowSkin, hPos, v if (color instanceof Array) color = core.arrayToRGBA(color); core.setFillStyle('ui', color); var offset = this.HPIXEL; - if (core.isset(choices[i].icon)) { + if (choices[i].icon) { var iconInfo = this._getDrawableIconInfo(choices[i].icon), image = iconInfo[0], icon = iconInfo[1]; if (image != null) { core.drawImage('ui', image, 0, 32 * icon, 32, 32, @@ -2035,7 +2035,7 @@ ui.prototype.drawShop = function (shopId) { for (var i=0;i