score: use top status bar as trigger for the menu instead of the physical button

master
aleixdev 2024-10-23 15:44:09 +02:00
parent 41bffb341c
commit 635085b6ed
1 changed files with 10 additions and 4 deletions

View File

@ -54,7 +54,9 @@ function setupInputWatchers(init) {
}
});
if (init) {
setWatch(() => handleInput(2), isBangle1 ? BTN2 : BTN, { repeat: true });
if (isBangle1) {
setWatch(() => handleInput(2), BTN2, { repeat: true });
}
Bangle.on('touch', (b, e) => {
if (isBangle1) {
if (b === 1) {
@ -63,10 +65,14 @@ function setupInputWatchers(init) {
handleInput(4);
}
} else {
if (e.x < getXCoord(w => w/2)) {
handleInput(0);
if (e.y > 18) {
if (e.x < getXCoord(w => w/2)) {
handleInput(0);
} else {
handleInput(1);
}
} else {
handleInput(1);
handleInput(2);
}
}
});