From a2506d70683ae8e9273b2c35aff635dd187d3285 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 10 Apr 2019 18:46:29 +0800 Subject: [PATCH] Fix drawTextBox \b --- libs/events.js | 10 +++++++++- libs/ui.js | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/events.js b/libs/events.js index a48021b6..07ede640 100644 --- a/libs/events.js +++ b/libs/events.js @@ -70,7 +70,7 @@ events.prototype._startGame_start = function (hard, seed, route, callback) { events.prototype._startGame_afterStart = function (nowLoc, callback) { core.ui.closePanel(); - core.showStatusBar(); + this._startGame_statusBar(); core.dom.musicBtn.style.display = 'none'; core.changeFloor(core.firstData.floorId, null, nowLoc, null, function () { // 插入一个空事件避免直接回放录像出错 @@ -80,6 +80,14 @@ events.prototype._startGame_afterStart = function (nowLoc, callback) { this._startGame_upload(); } +// 开始游戏时是否显示状态栏 +events.prototype._startGame_statusBar = function () { + if (core.flags.startUsingCanvas) + core.hideStatusBar(); + else + core.showStatusBar(); +} + events.prototype._startGame_upload = function () { // Upload var formData = new FormData(); diff --git a/libs/ui.js b/libs/ui.js index 9e85f57f..fc6a9047 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -768,8 +768,8 @@ ui.prototype.drawTextBox = function(content, showAll) { var textAttribute = core.status.textAttribute; var titleInfo = this._getTitleAndIcon(content); var posInfo = this._getPosition(titleInfo.content); - if (!posInfo.position) posInfo.position = textAttribute.position; if (posInfo.position != 'up' && posInfo.position != 'down') posInfo.px = posInfo.py = null; + if (!posInfo.position) posInfo.position = textAttribute.position; content = this._drawTextBox_drawImages(posInfo.content); // Step 2: 计算对话框的矩形位置