Fix textbox width
This commit is contained in:
parent
0d9507768b
commit
922b07a46d
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -118,7 +118,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
],
|
||||
"dw": 100,
|
||||
"dh": 100,
|
||||
"opacity": 100,
|
||||
"opacity": 1,
|
||||
"time": 0
|
||||
},
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user