From 635085b6ed034d4b54b31b3e2dedf135979d80ab Mon Sep 17 00:00:00 2001 From: aleixdev Date: Wed, 23 Oct 2024 15:44:09 +0200 Subject: [PATCH] score: use top status bar as trigger for the menu instead of the physical button --- apps/score/score.app.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/score/score.app.js b/apps/score/score.app.js index a5500aa4f..bb9b7b44b 100644 --- a/apps/score/score.app.js +++ b/apps/score/score.app.js @@ -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); } } });