diff --git a/apps/dtlaunch/ChangeLog b/apps/dtlaunch/ChangeLog index e0bd76eb0..1155647ab 100644 --- a/apps/dtlaunch/ChangeLog +++ b/apps/dtlaunch/ChangeLog @@ -27,4 +27,5 @@ widgets would still be loaded when they weren't supposed to. immediately follows the correct theme. 0.22: Bangle 2: Change to not automatically marking the first app on a page when moving pages. Add caching for faster startups. +0.23: Bangle 1: Fix issue with missing icons, added touch screen interactions diff --git a/apps/dtlaunch/README.md b/apps/dtlaunch/README.md index 1835bc842..ff562d9db 100644 --- a/apps/dtlaunch/README.md +++ b/apps/dtlaunch/README.md @@ -6,6 +6,10 @@ Bangle 1: In the picture above, the Settings app is selected. + +![](sshot_e1.png) + + Bangle 2: ![shot1](https://user-images.githubusercontent.com/89286474/146471756-ec6d16de-6916-4fde-b991-ba88c2c8fa1a.png) @@ -25,6 +29,12 @@ Bangle 2: **Swipe Right** - move to previous page of app icons +**Touch Left(1) area** - "Back" to Clock + +**Touch Right(2) area** - move forward through app icons + +**Touch Middle(1+2) area** - run the selected app + ## Controls- Bangle 2 **Touch** - icon to select, second touch launches app diff --git a/apps/dtlaunch/app-b1.js b/apps/dtlaunch/app-b1.js index ed9cc778e..c7e78d671 100644 --- a/apps/dtlaunch/app-b1.js +++ b/apps/dtlaunch/app-b1.js @@ -13,13 +13,13 @@ function wdog(handle,timeout){ wdog.timeout = timeout; } if(wdog.timer){ - clearTimeout(wdog.timer) + clearTimeout(wdog.timer); } - wdog.timer = setTimeout(wdog.handle,wdog.timeout) + wdog.timer = setTimeout(wdog.handle,wdog.timeout); } // reset after two minutes of inactivity -wdog(load,120000) +wdog(load,120000); var s = require("Storage"); var apps = s.list(/\.info$/).map(app=>{ @@ -49,7 +49,13 @@ function draw_icon(p,n,selected) { var y = n>2?130:40; (selected?g.setColor(0.3,0.3,0.3):g.setColor(0,0,0)).fillRect(x,y,x+79,y+89); g.setColor(g.theme.fg); - g.drawImage(s.read(apps[p*6+n].icon),x+10,y+10,{scale:1.25}); + //bad g.drawImage(s.read(apps[p*6+n].icon),x+10,y+10,{scale:1.25}); + if ((apps[p*6+n].icon)){ + if (s.read(apps[p*6+n].icon)) //ensure that graph exist + g.drawImage(s.read(apps[p*6+n].icon),x+10,y+10,{scale:1.25}); + else console.log("icon file NOT exist :"+apps[p*6+n].icon); + } + else console.log("icon property NOT exist"); g.setColor(-1).setFontAlign(0,-1,0).setFont("6x8",1); var txt = apps[p*6+n].name.split(" "); for (var i = 0; i < txt.length; i++) { @@ -65,10 +71,31 @@ function drawPage(p){ if (!apps[p*6+i]) return i; draw_icon(p,i,selected==i); } -} + } + + // case was not working +Bangle.on("touch", function(tzone){ + //(tzone)=>{ + //console.log("tzone"+tzone); + switch(tzone){ + case 1: //left managed by + console.log("1, left or back to clock?"); + load();//clock + //nextapp(-1); + break; + case 2: // right + nextapp(1); + break; + case 3: //center 1+2 no for emul + doselect(); + break; + default: + console.log("no match"); + } + }); Bangle.on("swipe",(dir)=>{ - wdog() + wdog(); selected = 0; oldselected=-1; if (dir<0){ diff --git a/apps/dtlaunch/metadata.json b/apps/dtlaunch/metadata.json index b19d59e49..4262ebc26 100644 --- a/apps/dtlaunch/metadata.json +++ b/apps/dtlaunch/metadata.json @@ -1,7 +1,7 @@ { "id": "dtlaunch", "name": "Desktop Launcher", - "version": "0.22", + "version": "0.23", "description": "Desktop style App Launcher with six (four for Bangle 2) apps per page - fast access if you have lots of apps installed.", "screenshots": [{"url":"shot1.png"},{"url":"shot2.png"},{"url":"shot3.png"}], "icon": "icon.png", diff --git a/apps/dtlaunch/sshot_e1.png b/apps/dtlaunch/sshot_e1.png new file mode 100644 index 000000000..69f708c33 Binary files /dev/null and b/apps/dtlaunch/sshot_e1.png differ