From 922b07a46d76eacbc6592bbccbd92ab479d6305d Mon Sep 17 00:00:00 2001 From: oc Date: Thu, 20 Dec 2018 04:56:50 +0800 Subject: [PATCH] Fix textbox width --- libs/control.js | 5 ++++- libs/ui.js | 2 ++ project/data.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/control.js b/libs/control.js index 3faf777d..0e888612 100644 --- a/libs/control.js +++ b/libs/control.js @@ -2016,9 +2016,12 @@ control.prototype.load = function (need) { // 游戏开始前读档 if (!core.isPlaying()) { + core.dom.startPanel.style.display = 'none'; + core.clearStatus(); + core.clearMap('all'); + core.deleteAllCanvas(); core.status.event = {'id': 'load', 'data': null}; core.status.lockControl = true; - core.dom.startPanel.style.display = 'none'; core.ui.drawSLPanel(10*page+offset); return; } diff --git a/libs/ui.js b/libs/ui.js index c37c8dad..98b1512b 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -595,6 +595,8 @@ ui.prototype.drawTextBox = function(content, showAll) { // 对话框效果:改为动态计算 if (core.isset(px) && core.isset(py)) { var min_width = 220 - leftSpace, max_width = validWidth; + // 无行走图或头像,则可以适当缩小min_width + if (leftSpace == 20) min_width = 160; core.setFont('ui', font); validWidth = this.calTextBoxWidth('ui', realContent, min_width, max_width); width = validWidth + leftSpace + rightSpace; diff --git a/project/data.js b/project/data.js index 8e196751..080a41f7 100644 --- a/project/data.js +++ b/project/data.js @@ -118,7 +118,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = ], "dw": 100, "dh": 100, - "opacity": 100, + "opacity": 1, "time": 0 }, {