mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-11-11 20:02:57 +08:00
Compare commits
No commits in common. "c9a8113d86810d809d41f89a061f5bcb5b5bb5fc" and "2a59e135ba1fdb2000d765d1d414f07f4f1dee81" have entirely different histories.
c9a8113d86
...
2a59e135ba
@ -133,7 +133,7 @@ export const GameTitle = defineComponent<GameTitleProps>(props => {
|
||||
};
|
||||
});
|
||||
hard.push({
|
||||
code: -1,
|
||||
code: main.levelChoose.length,
|
||||
color: '#aaa',
|
||||
name: '返回',
|
||||
hard: '',
|
||||
@ -202,13 +202,13 @@ export const GameTitle = defineComponent<GameTitleProps>(props => {
|
||||
});
|
||||
};
|
||||
|
||||
const clickButton = (code: number, index: number) => {
|
||||
const clickButton = (code: number) => {
|
||||
if (selectHard.value) {
|
||||
if (index === hard.length - 1) {
|
||||
if (code === hard.length - 1) {
|
||||
toggleHard();
|
||||
return;
|
||||
}
|
||||
const item = hard[index];
|
||||
const item = hard[code];
|
||||
startGame(item.name);
|
||||
} else {
|
||||
switch (code) {
|
||||
@ -266,11 +266,7 @@ export const GameTitle = defineComponent<GameTitleProps>(props => {
|
||||
{ type: 'down' }
|
||||
)
|
||||
.realize('confirm', () => {
|
||||
if (selectHard.value) {
|
||||
clickButton(hard[selected.value].code, selected.value);
|
||||
} else {
|
||||
clickButton(buttons[selected.value].code, selected.value);
|
||||
}
|
||||
clickButton(selected.value);
|
||||
});
|
||||
|
||||
//#region 鼠标操作
|
||||
@ -486,7 +482,7 @@ export const GameTitle = defineComponent<GameTitleProps>(props => {
|
||||
// 这个缩放性能影响极大,原因不明
|
||||
// scale={[v.scale.ref.value, v.scale.ref.value]}
|
||||
onEnter={() => enterMain(i)}
|
||||
onClick={() => clickButton(v.code, i)}
|
||||
onClick={() => clickButton(i)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
@ -508,7 +504,7 @@ export const GameTitle = defineComponent<GameTitleProps>(props => {
|
||||
filter={buttonFilter}
|
||||
fillStyle={v.colorTrans.ref.value}
|
||||
onEnter={() => enterHard(i)}
|
||||
onClick={() => clickButton(v.code, i)}
|
||||
onClick={() => clickButton(i)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user