加入自动放缩选项
This commit is contained in:
parent
71e193c641
commit
acf993150b
@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
- [第一章:伤害计算函数](L1)
|
- [第一章:伤害计算函数](L1)
|
||||||
- [第二章:特殊属性定义,表格配置](L2)
|
- [第二章:特殊属性定义,表格配置](L2)
|
||||||
- [第二章:怪物真实属性](L3)
|
- [第三章:怪物真实属性](L3)
|
||||||
|
|||||||
@ -2301,6 +2301,11 @@ actions.prototype._clickSwitchs_display = function (x, y) {
|
|||||||
core.playSound('确定');
|
core.playSound('确定');
|
||||||
return this._clickSwitchs_display_extraDamageType();
|
return this._clickSwitchs_display_extraDamageType();
|
||||||
case 7:
|
case 7:
|
||||||
|
core.playSound('确定');
|
||||||
|
core.setLocalStorage('autoScale', core.getLocalStorage('autoScale') ? false : true);
|
||||||
|
core.ui._drawSwitchs_display();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
core.status.event.selection = 1;
|
core.status.event.selection = 1;
|
||||||
core.playSound('取消');
|
core.playSound('取消');
|
||||||
core.ui._drawSwitchs();
|
core.ui._drawSwitchs();
|
||||||
|
|||||||
@ -1953,6 +1953,7 @@ ui.prototype._drawSwitchs_display = function () {
|
|||||||
"临界显伤: " + (core.flags.displayCritical ? "[ON]" : "[OFF]"),
|
"临界显伤: " + (core.flags.displayCritical ? "[ON]" : "[OFF]"),
|
||||||
"领域显伤: " + (core.flags.displayExtraDamage ? "[ON]" : "[OFF]"),
|
"领域显伤: " + (core.flags.displayExtraDamage ? "[ON]" : "[OFF]"),
|
||||||
"领域模式: " + (core.flags.extraDamageType == 2 ? "[最简]" : core.flags.extraDamageType == 1 ? "[半透明]" : "[完整]"),
|
"领域模式: " + (core.flags.extraDamageType == 2 ? "[最简]" : core.flags.extraDamageType == 1 ? "[半透明]" : "[完整]"),
|
||||||
|
"自动放缩: " + (core.getLocalStorage('autoScale') ? "[ON]" : "[OFF]"),
|
||||||
"返回上一级",
|
"返回上一级",
|
||||||
];
|
];
|
||||||
this.drawChoices(null, choices);
|
this.drawChoices(null, choices);
|
||||||
|
|||||||
21
main.js
21
main.js
@ -238,16 +238,19 @@ main.prototype.init = function (mode, callback) {
|
|||||||
main.core.init(coreData, callback);
|
main.core.init(coreData, callback);
|
||||||
main.core.resize();
|
main.core.resize();
|
||||||
// 自动放缩最大化
|
// 自动放缩最大化
|
||||||
try {
|
if (core.getLocalStorage('autoScale') === void 0) core.setLocalStorage('autoScale', true);
|
||||||
if (main.core) {
|
if (core.getLocalStorage('autoScale') && !core.domStyle.isVertical) {
|
||||||
var index = main.core.domStyle.availableScale.indexOf(core.domStyle.scale);
|
try {
|
||||||
main.core.control.setDisplayScale(main.core.domStyle.availableScale.length - 1 - index);
|
if (main.core) {
|
||||||
if (!main.core.isPlaying() && main.core.flags.enableHDCanvas) {
|
var index = main.core.domStyle.availableScale.indexOf(core.domStyle.scale);
|
||||||
main.core.domStyle.ratio = Math.max(window.devicePixelRatio || 1, main.core.domStyle.scale);
|
main.core.control.setDisplayScale(main.core.domStyle.availableScale.length - 1 - index);
|
||||||
main.core.resize();
|
if (!main.core.isPlaying() && main.core.flags.enableHDCanvas) {
|
||||||
|
main.core.domStyle.ratio = Math.max(window.devicePixelRatio || 1, main.core.domStyle.scale);
|
||||||
|
main.core.resize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (e) { console.error(e) };
|
||||||
} catch (e) { console.error(e) };
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user