refactor(09-13): replace core.drawTip/core.playSound callsites with direct interfaces

- ui/save.tsx: core.drawTip(validation.message) -> TipStore.get('main-tip')?.drawTip(...) (C:drawTip)

- ui/settings.tsx: core.playSound('confirm.opus') -> props.state.soundPlayer.play('confirm.opus') (C:playSound)

- no client singleton; no new naming; no import type
This commit is contained in:
unanmed 2026-10-12 16:13:35 +08:00
parent 12bb67b5db
commit 0747fcaa9a
2 changed files with 5 additions and 4 deletions

View File

@ -18,6 +18,7 @@ import {
Page,
PageExpose,
Thumbnail,
TipStore,
IGameUIPropsBase
} from '@user/client-base';
import { useKey } from '../render/use';
@ -528,7 +529,7 @@ export function selectSave(
controller.close(instance);
res(index);
} else {
core.drawTip(validation.message);
TipStore.get('main-tip')?.drawTip(validation.message);
}
},
onDelete: (index: number, exist: boolean) => {
@ -537,7 +538,7 @@ export function selectSave(
if (validation.valid) {
core.removeSave(index);
} else {
core.drawTip(validation.message);
TipStore.get('main-tip')?.drawTip(validation.message);
}
},
onExit: () => {

View File

@ -428,7 +428,7 @@ export const SyncSaveSelect = defineComponent<MainSettingsProps>(props => {
const choose = async (key: ChoiceKey) => {
switch (key) {
case SyncSaveChoice.AllSaves: {
core.playSound('confirm.opus');
props.state.soundPlayer.play('confirm.opus');
const confirm = await getConfirm(
props.controller,
'你确定要同步全部存档么?这可能在存档较多的时候比较慢。',
@ -441,7 +441,7 @@ export const SyncSaveSelect = defineComponent<MainSettingsProps>(props => {
break;
}
case SyncSaveChoice.NowSave: {
core.playSound('confirm.opus');
props.state.soundPlayer.play('confirm.opus');
const confirm = await getConfirm(
props.controller,
'确定要同步当前存档吗?',