mirror of https://github.com/espruino/BangleApps
Allow scrolling to wrap around (fix #382)
parent
0dbbce2134
commit
87cf91d80e
|
@ -41,7 +41,7 @@
|
|||
"name": "Default Launcher",
|
||||
"shortName":"Launcher",
|
||||
"icon": "app.png",
|
||||
"version":"0.02",
|
||||
"version":"0.03",
|
||||
"description": "This is needed by Bangle.js to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.",
|
||||
"tags": "tool,system,launcher",
|
||||
"type":"launch",
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
0.01: New App!
|
||||
0.02: Only store relevant app data (saves RAM when many apps)
|
||||
0.03: Allow scrolling to wrap around (fix #382)
|
||||
|
|
|
@ -40,16 +40,14 @@ function drawMenu() {
|
|||
}
|
||||
drawMenu();
|
||||
setWatch(function() {
|
||||
if (selected>0) {
|
||||
selected--;
|
||||
if (selected<0) selected = apps.length-1;
|
||||
drawMenu();
|
||||
}
|
||||
}, BTN1, {repeat:true});
|
||||
setWatch(function() {
|
||||
if (selected+1<apps.length) {
|
||||
selected++;
|
||||
if (selected>=apps.length) selected = 0;
|
||||
drawMenu();
|
||||
}
|
||||
}, BTN3, {repeat:true});
|
||||
setWatch(function() { // run
|
||||
if (!apps[selected].src) return;
|
||||
|
|
Loading…
Reference in New Issue