mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-19 17:16:08 +08:00
feat: 怪物手册缩放
This commit is contained in:
parent
faf7b9b654
commit
9463891af2
@ -487,6 +487,8 @@ mainSetting
|
|||||||
.setDisplayFunc('mapScale', value => `${value}%`)
|
.setDisplayFunc('mapScale', value => `${value}%`)
|
||||||
.register('toolbarScale', '工具栏缩放', 100, COM.Number, [10, 500, 10])
|
.register('toolbarScale', '工具栏缩放', 100, COM.Number, [10, 500, 10])
|
||||||
.setDisplayFunc('toolbarScale', value => `${value}%`)
|
.setDisplayFunc('toolbarScale', value => `${value}%`)
|
||||||
|
.register('bookScale', '怪物手册缩放', 100, COM.Number, [10, 500, 10])
|
||||||
|
.setDisplayFunc('bookScale', value => `${value}%`)
|
||||||
)
|
)
|
||||||
.register(
|
.register(
|
||||||
'debug',
|
'debug',
|
||||||
@ -524,6 +526,7 @@ loading.once('coreInit', () => {
|
|||||||
'ui.toolbarScale',
|
'ui.toolbarScale',
|
||||||
isMobile ? 50 : Math.floor(window.innerWidth / 1700 * 10) * 10
|
isMobile ? 50 : Math.floor(window.innerWidth / 1700 * 10) * 10
|
||||||
),
|
),
|
||||||
|
'ui.bookScale': storage.getValue('ui.bookScale', isMobile ? 100 : 80),
|
||||||
'debug.frame': !!storage.getValue('debug.frame', false),
|
'debug.frame': !!storage.getValue('debug.frame', false),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -550,6 +553,8 @@ mainSetting
|
|||||||
.setDescription('audio.soundEnabled', `是否开启音效`)
|
.setDescription('audio.soundEnabled', `是否开启音效`)
|
||||||
.setDescription('audio.soundVolume', `音效的音量`)
|
.setDescription('audio.soundVolume', `音效的音量`)
|
||||||
.setDescription('ui.mapScale', `楼传小地图的缩放,百分比格式`)
|
.setDescription('ui.mapScale', `楼传小地图的缩放,百分比格式`)
|
||||||
|
.setDescription('ui.toolbarScale', `自定义工具栏的缩放比例`)
|
||||||
|
.setDescription('ui.bookScale', `怪物手册界面中每个怪物框体的高度缩放,最小值限定为 20% 屏幕高度`)
|
||||||
.setDescription('screen.fontSizeStatus', `修改状态栏的字体大小`)
|
.setDescription('screen.fontSizeStatus', `修改状态栏的字体大小`)
|
||||||
.setDescription('screen.blur', '打开任意ui界面时是否有背景虚化效果,移动端打开后可能会有掉帧或者发热现象。关闭ui后生效');
|
.setDescription('screen.blur', '打开任意ui界面时是否有背景虚化效果,移动端打开后可能会有掉帧或者发热现象。关闭ui后生效');
|
||||||
|
|
||||||
|
@ -50,6 +50,8 @@ import { getDetailedEnemy } from '../plugin/ui/fixed';
|
|||||||
import { GameUi } from '@/core/main/custom/ui';
|
import { GameUi } from '@/core/main/custom/ui';
|
||||||
import { gameKey } from '@/core/main/init/hotkey';
|
import { gameKey } from '@/core/main/init/hotkey';
|
||||||
import { mainUi } from '@/core/main/init/ui';
|
import { mainUi } from '@/core/main/init/ui';
|
||||||
|
import { mainSetting } from '@/core/main/setting';
|
||||||
|
import { isMobile } from '@/plugin/use';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
num: number;
|
num: number;
|
||||||
@ -70,6 +72,14 @@ const drag = ref(false);
|
|||||||
const detail = ref(false);
|
const detail = ref(false);
|
||||||
const selected = ref(0);
|
const selected = ref(0);
|
||||||
|
|
||||||
|
const settingScale = mainSetting.getValue('ui.bookScale', 100) / 100;
|
||||||
|
const scale = isMobile
|
||||||
|
? Math.max(settingScale * 15, 20)
|
||||||
|
: Math.max(
|
||||||
|
(window.innerWidth / window.innerHeight) * 15 * settingScale,
|
||||||
|
20
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选择怪物,展示详细信息
|
* 选择怪物,展示详细信息
|
||||||
* @param enemy 选择的怪物
|
* @param enemy 选择的怪物
|
||||||
@ -216,7 +226,7 @@ onUnmounted(() => {
|
|||||||
.enemy {
|
.enemy {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 20vh;
|
height: v-bind('scale + "vh"');
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 1% 0 1%;
|
padding: 0 1% 0 1%;
|
||||||
}
|
}
|
||||||
@ -232,7 +242,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.enemy {
|
.enemy {
|
||||||
height: 15vh;
|
height: v-bind('scale * 2 / 3 + "vh"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user