mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-10-29 10:22:59 +08:00
fix: 选择框录像 & 存档索引
This commit is contained in:
parent
d0857634d4
commit
a858069e6d
@ -715,6 +715,7 @@ export async function routedConfirm(
|
|||||||
const confirm = getChoiceRoute(1) === 0;
|
const confirm = getChoiceRoute(1) === 0;
|
||||||
const timeout = core.control.__replay_getTimeout();
|
const timeout = core.control.__replay_getTimeout();
|
||||||
core.status.route.push(`choices:${confirm ? 0 : 1}`);
|
core.status.route.push(`choices:${confirm ? 0 : 1}`);
|
||||||
|
core.status.replay.toReplay.shift();
|
||||||
if (timeout === 0) return confirm;
|
if (timeout === 0) return confirm;
|
||||||
const instance = controller.open(ConfirmBoxUI, {
|
const instance = controller.open(ConfirmBoxUI, {
|
||||||
...(props ?? {}),
|
...(props ?? {}),
|
||||||
@ -769,6 +770,7 @@ export async function routedChoices<T extends ChoiceKey>(
|
|||||||
const selected = getChoiceRoute(0);
|
const selected = getChoiceRoute(0);
|
||||||
const timeout = core.control.__replay_getTimeout();
|
const timeout = core.control.__replay_getTimeout();
|
||||||
core.status.route.push(`choices:${selected}`);
|
core.status.route.push(`choices:${selected}`);
|
||||||
|
core.status.replay.toReplay.shift();
|
||||||
if (timeout === 0) return choices[selected][0];
|
if (timeout === 0) return choices[selected][0];
|
||||||
const instance = controller.open(ChoicesUI, {
|
const instance = controller.open(ChoicesUI, {
|
||||||
...(props ?? {}),
|
...(props ?? {}),
|
||||||
@ -782,7 +784,7 @@ export async function routedChoices<T extends ChoiceKey>(
|
|||||||
return choices[selected][0];
|
return choices[selected][0];
|
||||||
} else {
|
} else {
|
||||||
const choice = await getChoice(controller, choices, loc, width, props);
|
const choice = await getChoice(controller, choices, loc, width, props);
|
||||||
const index = choices.findIndex(v => v[1] === choice);
|
const index = choices.findIndex(v => v[0] === choice);
|
||||||
core.status.route.push(`choices:${index}`);
|
core.status.route.push(`choices:${index}`);
|
||||||
return choice;
|
return choice;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -241,10 +241,10 @@ export const Save = defineComponent<SaveProps, SaveEmits, keyof SaveEmits>(
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const startIndex = getPosIndex(core.saves.saveIndex);
|
const startIndex = getPosIndex(core.saves.saveIndex - 1);
|
||||||
selected.value = startIndex - 1;
|
selected.value = startIndex;
|
||||||
pageRef.value?.changePage(
|
pageRef.value?.changePage(
|
||||||
Math.floor(core.saves.saveIndex / (grid.value.count - 1))
|
Math.floor((core.saves.saveIndex - 1) / (grid.value.count - 1))
|
||||||
);
|
);
|
||||||
updateDataList(now.value);
|
updateDataList(now.value);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user