mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 12:49:25 +08:00
fix: 数字设置
This commit is contained in:
parent
d7ee49dd23
commit
1d7d177cae
@ -60,6 +60,9 @@ function NumberSetting(props: SettingComponentProps) {
|
|||||||
const { setting, displayer, item } = props;
|
const { setting, displayer, item } = props;
|
||||||
const changeValue = (value: number) => {
|
const changeValue = (value: number) => {
|
||||||
if (typeof value !== 'number') return;
|
if (typeof value !== 'number') return;
|
||||||
|
if (value < (item.step?.[0] ?? 0) || value > (item.step?.[1] ?? 100)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setting.setValue(displayer.selectStack.join('.'), value);
|
setting.setValue(displayer.selectStack.join('.'), value);
|
||||||
displayer.update();
|
displayer.update();
|
||||||
};
|
};
|
||||||
|
@ -312,8 +312,6 @@ export class SettingDisplayer extends EventEmitter<SettingDisplayerEvent> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: 优化存储方式
|
|
||||||
|
|
||||||
export const mainSetting = new MotaSetting();
|
export const mainSetting = new MotaSetting();
|
||||||
// 添加不参与全局存储的设置
|
// 添加不参与全局存储的设置
|
||||||
MotaSetting.noStorage.push('action.autoSkill', 'screen.fullscreen');
|
MotaSetting.noStorage.push('action.autoSkill', 'screen.fullscreen');
|
||||||
@ -516,4 +514,5 @@ mainSetting
|
|||||||
.setDescription('audio.bgmEnabled', `是否开启背景音乐`)
|
.setDescription('audio.bgmEnabled', `是否开启背景音乐`)
|
||||||
.setDescription('audio.bgmVolume', `背景音乐的音量`)
|
.setDescription('audio.bgmVolume', `背景音乐的音量`)
|
||||||
.setDescription('audio.soundEnabled', `是否开启音效`)
|
.setDescription('audio.soundEnabled', `是否开启音效`)
|
||||||
.setDescription('audio.soundVolume', `音效的音量`);
|
.setDescription('audio.soundVolume', `音效的音量`)
|
||||||
|
.setDescription('ui.mapScale', `楼传小地图的缩放,百分比格式`);
|
||||||
|
Loading…
Reference in New Issue
Block a user