Skip to content

Commit 5a8e93f

Browse files
committed
新的设置项类型
1 parent f75e5b4 commit 5a8e93f

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

MaiChartManager/Front/src/components/ModManager/ConfigEntry.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ export default defineComponent({
1717
setup(props, { emit }) {
1818
const { t, te } = useI18n();
1919

20+
const optionsIoKeyMap = [
21+
{ label: t('mod.adxHid.disabled'), value: 'None' },
22+
{ label: t('mod.adxHid.select1P'), value: 'Select1P' },
23+
{ label: t('mod.adxHid.select2P'), value: 'Select2P' },
24+
{ label: t('mod.adxHid.service'), value: 'Service' },
25+
{ label: t('mod.adxHid.test'), value: 'Test' },
26+
];
27+
28+
const optionsSoundChannel = ['None', 'P1SpeakerLeft', 'P1SpeakerRight', 'P1HeadphoneLeft', 'P1HeadphoneRight', 'P2SpeakerLeft', 'P2SpeakerRight', 'P2HeadphoneLeft', 'P2HeadphoneRight']
29+
.map(channel => ({ label: t('mod.soundChannel.' + channel), value: channel }));
30+
2031
const comment = computed(() => {
2132
const localeKey = 'mod.commentOverrides.' + props.entry.path!.replace(/\./g, '_');
2233
if (te(localeKey)) {
@@ -59,6 +70,12 @@ export default defineComponent({
5970
return <NSelect v-model:value={props.entryState.value} options={Object.entries(KeyCodeName).map(([label, value]) => ({ label, value }))}/>;
6071
case 'AquaMai.Config.Types.KeyCodeID':
6172
return <NSelect v-model:value={props.entryState.value} options={Object.entries(KeyCodeID).map(([label, value]) => ({label, value}))}/>;
73+
case 'AquaMai.Config.Types.IOKeyMap':
74+
return <NSelect v-model:value={props.entryState.value} options={optionsIoKeyMap}/>;
75+
case 'AquaMai.Config.Types.AdxKeyMap':
76+
return <NSelect v-model:value={props.entryState.value} options={optionsIoKeyMap}/>;
77+
case 'AquaMai.Config.Types.SoundChannel':
78+
return <NSelect v-model:value={props.entryState.value} options={optionsSoundChannel}/>;
6279
}
6380
return t('mod.unsupportedType', { type: props.entry.fieldType });
6481
})()}

MaiChartManager/Front/src/locales/zh.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,16 @@ mod:
311311
button2P: 2P 按键 {index}
312312
select1P: 1P 选择键
313313
select2P: 2P 选择键
314+
soundChannel:
315+
P1SpeakerLeft: 1P 外放左
316+
P1SpeakerRight: 1P 外放右
317+
P1HeadphoneLeft: 1P 耳机左
318+
P1HeadphoneRight: 1P 耳机右
319+
P2SpeakerLeft: 2P 外放左
320+
P2SpeakerRight: 2P 外放右
321+
P2HeadphoneLeft: 2P 耳机左
322+
P2HeadphoneRight: 2P 耳机右
323+
None: 禁用
314324
judgeAccuracyInfo:
315325
author: 作者:
316326
viewDoc: 查看说明文件

0 commit comments

Comments
 (0)