增加设置

This commit is contained in:
unanmed 2022-12-30 15:56:47 +08:00
parent c39d073ff8
commit f683a25895
6 changed files with 55 additions and 4 deletions

View File

@ -666,7 +666,13 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "checkbox",
"_docs": "虚化前景层",
"_data": "是否虚化前景层;如果此项开启,则在游戏中事件层有东西(如宝石等)时虚化前景层。"
}
},
"autoScale": {
"_leaf": true,
"_type": "checkbox",
"_docs": "自动缩放最大化",
"_data": "是否自动缩放最大化,关闭后不再最大化"
},
}
}
}

View File

@ -676,6 +676,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"disableShopOnDamage": false,
"blurFg": true,
"extendToolbar": true,
"enableEnemyPoint": null
"enableEnemyPoint": null,
"autoScale": true
}
}

View File

@ -2,7 +2,8 @@
"transition": {
"text": "界面动画",
"desc": [
"是否展示当一个ui界面如怪物手册等的打开与关闭时的动画。当此项开启时所有界面被打开或关闭时都会展示动画否则会直接展示出来"
"是否展示当一个ui界面如怪物手册等的打开与关闭时的动画。当此项开启时",
"所有界面被打开或关闭时都会展示动画,否则会直接展示出来"
]
},
"itemDetail": {
@ -14,5 +15,9 @@
"desc": [
"开启后,打怪物的时候会自动选择伤害最低的技能。同时显伤也会显示此状态下的伤害。"
]
},
"autoScale": {
"text": "自动放缩",
"desc": ["开启后,每次进入游戏时会自动缩放游戏画面至合适值。"]
}
}

View File

@ -15,6 +15,11 @@ export const itemDetail = ref(true);
*/
export const autoSkill = ref(true);
/**
*
*/
export const autoScale = ref(true);
watch(transition, n => {
core.plugin.transition.value = n;
core.setLocalStorage('transition', n);
@ -31,11 +36,16 @@ watch(autoSkill, n => {
core.status.route.push(`set:autoSkill:${n}`);
});
watch(autoScale, n => {
core.setLocalStorage('autoScale', n);
});
/**
* localStorage读取即可
*/
function reset() {
transition.value = core.getLocalStorage('transition');
autoScale.value = core.getLocalStorage('autoScale');
}
function resetFlag() {

View File

@ -26,6 +26,14 @@
autoSkill ? 'ON' : 'OFF'
}}</span
>
<span
class="selectable setting-item"
:selected="selected === 'autoScale'"
@click="click('autoScale')"
>自动放缩:&nbsp;&nbsp;&nbsp;{{
autoScale ? 'ON' : 'OFF'
}}</span
>
</div></template
>
<template #right><span v-html="descText"></span></template
@ -34,7 +42,12 @@
<script lang="ts" setup>
import { computed, ref } from 'vue';
import { transition, itemDetail, autoSkill } from '../plugin/settings';
import {
transition,
itemDetail,
autoSkill,
autoScale
} from '../plugin/settings';
import settingInfo from '../data/settings.json';
import { has } from '../plugin/utils';
import Column from '../components/colomn.vue';
@ -72,6 +85,8 @@ function click(id: keyof Settings) {
itemDetail.value = !itemDetail.value;
} else if (id === 'autoSkill') {
autoSkill.value = !autoSkill.value;
} else if (id === 'autoScale') {
autoScale.value = !autoScale.value;
}
}
</script>

14
src/ui/skillTree.vue Normal file
View File

@ -0,0 +1,14 @@
<template>
<div id="skill-tree"></div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
</script>
<style lang="less" scoped>
#skill-tree {
width: 100%;
height: 100%;
}
</style>