Fix textbox width

This commit is contained in:
oc 2018-12-20 04:56:50 +08:00
parent 0d9507768b
commit 922b07a46d
3 changed files with 7 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -118,7 +118,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
],
"dw": 100,
"dh": 100,
"opacity": 100,
"opacity": 1,
"time": 0
},
{