-
• #2
In https://github.com/espruino/BangleApps/blob/fb7b69379a61d70bdde176837533e67cd2f6b288/apps/drinkcounter/app.js#L239 I'm checking the coordinates of the touch. Maybe that would be an approach.
-
• #3
I think you only need to remove the touch listener that you introduced on line 11. See my answer on another thread.
I first learnt that here.
EDIT: And here's the documentation.
-
• #4
Many thanks for the replies. @Ganblejs put me on the right track with listeners. Here's the working code...
var menu = { "" : { "title" : " Menu Test" }, "Do Nothing" : function() {}, "Close Menu" : function() { E.showMenu(); Bangle.on('touch', screenTouch); } }; function screenTouch() { Bangle.removeListener("touch", screenTouch); E.showMenu(menu); } g.clear(); E.showMenu(menu);
How do you terminate events in Bangle 2? Here's the problem I'm having...
After closing the menu there, a tap on the screen opens it again. However, if you tap where the "Close Menu" choice was, the menu promptly closes again. What's the best fix for this?