diff --git a/libs/events.js b/libs/events.js index 8214c6c1..cd4256dd 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1545,11 +1545,14 @@ events.prototype.clickSettings = function (x,y) { } else { var text="\t[本塔统计信息]"; + var toAdd=false; response.data.forEach(function (t) { + if (toAdd) text+="\n\n"; + toAdd=true; if (t.hard!='') text+=t.hard+"难度:\n" - text+="当前已有"+t.people+"人次游戏,"+t.score+"人次通关。\n"; - if (core.isset(t.max)) { - text+="当前MAX为"+t.max+",由"+(t.username||"匿名")+"于"+core.formatDate(new Date(1000*t.timestamp))+"打出。\n\n"; + text+="当前已有"+t.people+"人次游戏,"+t.score+"人次通关。"; + if (core.isset(t.max) && t.max>0) { + text+="\n当前MAX为"+t.max+",最早由"+(t.username||"匿名")+"于"+core.formatDate(new Date(1000*t.timestamp))+"打出。"; } }) core.drawText(text); diff --git a/libs/ui.js b/libs/ui.js index 08382c23..8215113f 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -653,7 +653,13 @@ ui.prototype.drawWaiting = function(text) { core.setAlpha('ui', 1); core.setFillStyle('ui', background); - var left = 97, top = 208 - 32 - 16, right = 416 - 2 * left, bottom = 416 - 2 * top; + core.setFont('ui', 'bold 17px Verdana'); + core.setFillStyle('ui', '#FFFFFF'); + var text_length = core.canvas.ui.measureText(text).width; + + var right = Math.max(text_length+50, 220); + var left = 416-2*right, top = 208 - 32 - 16, bottom = 416 - 2 * top; + core.fillRect('ui', left, top, right, bottom, background); core.strokeRect('ui', left - 1, top - 1, right + 1, bottom + 1, '#FFFFFF', 2);