-
• #2
Hi!
The issue is that the menu likes to stay around until it is explicitly removed - there are a few cases where it's handy.
However all you need to do is call
E.showMenu();
to remove the menu:var mainMenu = { "": { "title": "Menu" }, "Start a game": () => { E.showMenu(); // <------------------------ this startGame() }, "Exit" : () => closeApp(), };
-
• #3
Thanks works perfect!
Might be a good idea to add to the documentation what E.showMenu() does.
-
• #4
Thanks! I've just updated the docs and they'll go live in a bit.
It was shown in code example (for the
Exit
menu item), but wasn't very obvious. -
• #5
Thanks, Gordon.
Thumbs up for your efforts and quick responses. And Bangle.js is real fun ;-)
Hi
Below you can find some example code to illustrate my problem.
When I select "Start a game" in the menu, I start my game. But when I press BTN1 "in the game", the menu keeps flashing and when I press BTN1 / BTN2, the menu items are selected again and the game function for these buttons are activated too.
So how can I stop the built in button watches of the E.showMenu() function? Or what am I doing wrong?
Greets
Stijn