This commit is contained in:
ckcz123 2018-01-17 21:19:22 +08:00
parent 91cc1046e6
commit 62621e7449
2 changed files with 13 additions and 4 deletions

View File

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

View File

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