加入自动放缩选项

This commit is contained in:
unamed 2022-02-02 10:32:12 +08:00
parent 71e193c641
commit acf993150b
5 changed files with 19 additions and 10 deletions

View File

@ -1,4 +1,4 @@
- [第一章:伤害计算函数](L1) - [第一章:伤害计算函数](L1)
- [第二章:特殊属性定义,表格配置](L2) - [第二章:特殊属性定义,表格配置](L2)
- [章:怪物真实属性](L3) - [章:怪物真实属性](L3)

View File

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

View File

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

View File

@ -238,6 +238,8 @@ main.prototype.init = function (mode, callback) {
main.core.init(coreData, callback); main.core.init(coreData, callback);
main.core.resize(); main.core.resize();
// 自动放缩最大化 // 自动放缩最大化
if (core.getLocalStorage('autoScale') === void 0) core.setLocalStorage('autoScale', true);
if (core.getLocalStorage('autoScale') && !core.domStyle.isVertical) {
try { try {
if (main.core) { if (main.core) {
var index = main.core.domStyle.availableScale.indexOf(core.domStyle.scale); var index = main.core.domStyle.availableScale.indexOf(core.domStyle.scale);
@ -248,6 +250,7 @@ main.prototype.init = function (mode, callback) {
} }
} }
} catch (e) { console.error(e) }; } catch (e) { console.error(e) };
}
}); });
}); });
}); });

Binary file not shown.