diff --git a/apps.json b/apps.json index 2bd8ef7bf..e0f5142af 100644 --- a/apps.json +++ b/apps.json @@ -999,7 +999,7 @@ "name": "Touch Launcher", "shortName":"Menu", "icon": "app.png", - "version":"0.01", + "version":"0.02", "description": "Touch enable left to right launcher.", "tags": "tool,system,launcher", "type":"launch", diff --git a/apps/toucher/ChangeLog b/apps/toucher/ChangeLog index 5560f00bc..bd3d5d225 100644 --- a/apps/toucher/ChangeLog +++ b/apps/toucher/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Add swipe support and doucle tap to run application \ No newline at end of file diff --git a/apps/toucher/app.js b/apps/toucher/app.js index 1b5a9186c..2b80198c9 100644 --- a/apps/toucher/app.js +++ b/apps/toucher/app.js @@ -103,10 +103,28 @@ function drawMenu(){ } drawMenu(); + +// Physical buttons setWatch(prev, BTN1, {repeat:true}); -setWatch(prev, BTN4, {repeat:true}); - setWatch(next, BTN3, {repeat:true}); -setWatch(next, BTN5, {repeat:true}); - setWatch(run, BTN2, {repeat:true,edge:"falling"}); + +// Screen event +Bangle.on('touch', function(button){ + switch(button){ + case 1: + prev(); + break; + case 2: + next(); + break; + case 3: + run(); + break; + } +}); + +Bangle.on('swipe', dir => { + if(dir == 1) prev(); + else next(); +}); \ No newline at end of file