This commit is contained in:
ckcz123 2021-01-13 16:44:53 +08:00
parent 128f7cacdd
commit a9e4a71ae6
4 changed files with 21 additions and 9 deletions

View File

@ -780,15 +780,15 @@ ActionParser.prototype.parseAction = function() {
for(var ii=data.data.length-1,caseNow;caseNow=data.data[ii];ii--) {
if (caseNow["case"] == "keyboard") {
case_waitList = MotaActionFunctions.xmlText('waitContext_1',[
caseNow.keycode || "0", caseNow.nobreak || false, this.insertActionList(caseNow.action), case_waitList
caseNow.keycode || "0", caseNow["break"] || false, this.insertActionList(caseNow.action), case_waitList
], /* isShadow */false, /*comment*/ null, /*collapsed*/ caseNow._collapsed);
} else if (caseNow["case"] == "mouse") {
case_waitList = MotaActionFunctions.xmlText('waitContext_2',[
caseNow.px[0], caseNow.px[1], caseNow.py[0], caseNow.py[1], caseNow.nobreak || false, this.insertActionList(caseNow.action), case_waitList
caseNow.px[0], caseNow.px[1], caseNow.py[0], caseNow.py[1], caseNow["break"] || false, this.insertActionList(caseNow.action), case_waitList
], /* isShadow */false, /*comment*/ null, /*collapsed*/ caseNow._collapsed);
} else if (caseNow["case"] == "timeout") {
case_waitList = MotaActionFunctions.xmlText('waitContext_3',[
caseNow.nobreak || false, this.insertActionList(caseNow.action), case_waitList
caseNow["break"] || false, this.insertActionList(caseNow.action), case_waitList
], /* isShadow */false, /*comment*/ null, /*collapsed*/ caseNow._collapsed);
}
}

View File

@ -1407,6 +1407,7 @@ control.prototype._replay_SL = function () {
if (!core.status.replay.pausing) return core.drawTip("请先暂停录像");
if (core.isMoving() || core.status.replay.animate || core.status.event.id)
return core.drawTip("请等待当前事件的处理结束");
this._replay_hideProgress();
core.lockControl();
core.status.event.id='save';
@ -1424,6 +1425,7 @@ control.prototype._replay_book = function () {
|| (core.status.event.id && core.status.event.id != 'viewMaps'))
return core.drawTip("请等待当前事件的处理结束");
if (!core.hasItem('book')) return core.drawTip('你没有'+core.material.items['book'].name);
this._replay_hideProgress();
// 从“浏览地图”页面打开
if (core.status.event.id=='viewMaps')
@ -1440,6 +1442,7 @@ control.prototype._replay_viewMap = function () {
if (!core.status.replay.pausing) return core.drawTip("请先暂停录像");
if (core.isMoving() || core.status.replay.animate || core.status.event.id)
return core.drawTip("请等待当前事件的处理结束");
this._replay_hideProgress();
core.lockControl();
core.status.event.id='viewMaps';
@ -1451,6 +1454,7 @@ control.prototype._replay_toolbox = function () {
if (!core.status.replay.pausing) return core.drawTip("请先暂停录像");
if (core.isMoving() || core.status.replay.animate || core.status.event.id)
return core.drawTip("请等待当前事件的处理结束");
this._replay_hideProgress();
core.lockControl();
core.status.event.id='toolbox';
@ -1462,6 +1466,7 @@ control.prototype._replay_equipbox = function () {
if (!core.status.replay.pausing) return core.drawTip("请先暂停录像");
if (core.isMoving() || core.status.replay.animate || core.status.event.id)
return core.drawTip("请等待当前事件的处理结束");
this._replay_hideProgress();
core.lockControl();
core.status.event.id='equipbox';
@ -1574,7 +1579,13 @@ control.prototype._replay_error = function (action) {
});
}
control.prototype._replay_hideProgress = function () {
if (core.dymCanvas.replay) core.dymCanvas.replay.canvas.style.display = 'none';
}
control.prototype._replay_drawProgress = function () {
if (!core.dymCanvas.replay) return;
if (core.dymCanvas.replay.canvas.style.display == 'none') core.dymCanvas.replay.canvas.style.display = 'block';
var total = core.status.replay.totalList.length, left = total - core.status.replay.toReplay.length;
var content = '播放进度:' + left + ' / ' + total + ''+(left/total*100).toFixed(2)+'%';
var width = 26 + core.calWidth('replay', content, "16px Arial");

View File

@ -327,15 +327,10 @@ core.prototype._init_sys_flags = function () {
core.flags.displayExtraDamage = core.getLocalStorage('extraDamage', core.flags.displayExtraDamage);
core.flags.leftHandPrefer = core.getLocalStorage('leftHandPrefer', false);
core.flags.extraDamageType = core.getLocalStorage('extraDamageType', 0);
core.flags.enableHDCanvas = core.getLocalStorage('enableHDCanvas', true);
// 行走速度
core.values.moveSpeed = core.getLocalStorage('moveSpeed', 100);
core.values.floorChangeTime = core.getLocalStorage('floorChangeTime', core.values.floorChangeTime);
if (core.values.floorChangeTime == null) core.values.floorChangeTime = 500;
if (main.mode != 'editor') {
core.domStyle.scale = core.getLocalStorage('scale', 1);
if (core.flags.enableHDCanvas) core.domStyle.ratio = Math.max(window.devicePixelRatio || 1, core.domStyle.scale);
}
}
core.prototype._init_platform = function () {
@ -379,6 +374,12 @@ core.prototype._init_platform = function () {
core.platform.errorCallback();
}
}
core.flags.enableHDCanvas = core.getLocalStorage('enableHDCanvas', !core.platform.isIOS);
if (main.mode != 'editor') {
core.domStyle.scale = core.getLocalStorage('scale', 1);
if (core.flags.enableHDCanvas) core.domStyle.ratio = Math.max(window.devicePixelRatio || 1, core.domStyle.scale);
}
}
core.prototype._init_checkLocalForage = function () {

View File

@ -1604,8 +1604,8 @@ ui.prototype.drawChoices = function(content, choices) {
ui.prototype._drawChoices_getHorizontalPosition = function (titleInfo, choices) {
// 宽度计算:考虑提示文字和选项的长度
var width = this._calTextBoxWidth('ui', titleInfo.content || "", 246, this.PIXEL - 20);
core.setFont('ui', this._buildFont(17, true));
var width = this._calTextBoxWidth('ui', titleInfo.content || "", 246, this.PIXEL - 20);
for (var i = 0; i < choices.length; i++) {
if (typeof choices[i] === 'string')
choices[i] = {"text": choices[i]};