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