dtlaunch: add interaction-buzz setting
parent
e408fb9879
commit
bbdf943961
|
|
@ -28,4 +28,4 @@ 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
|
||||
|
||||
0.24: Add buzz-on-interaction setting
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
showLaunchers: true,
|
||||
direct: false,
|
||||
swipeExit: false,
|
||||
timeOut: "Off"
|
||||
timeOut: "Off",
|
||||
interactionBuzz: false,
|
||||
}, require('Storage').readJSON("dtlaunch.json", true) || {});
|
||||
|
||||
let s = require("Storage");
|
||||
|
|
@ -89,6 +90,13 @@
|
|||
g.flip();
|
||||
};
|
||||
|
||||
let buzzShort = function() {
|
||||
if (settings.interactionBuzz) Bangle.buzz(20);
|
||||
};
|
||||
let buzzLong = function() {
|
||||
if (settings.interactionBuzz) Bangle.buzz(100);
|
||||
};
|
||||
|
||||
Bangle.drawWidgets(); // To immediately update widget field to follow current theme - remove leftovers if previous app set custom theme.
|
||||
Bangle.loadWidgets();
|
||||
drawPage(0);
|
||||
|
|
@ -100,9 +108,11 @@
|
|||
if(settings.swipeExit && dirLeftRight==1) Bangle.showClock();
|
||||
if (dirUpDown==-1||dirLeftRight==-1){
|
||||
++page; if (page>maxPage) page=0;
|
||||
buzzShort();
|
||||
drawPage(page);
|
||||
} else if (dirUpDown==1||(dirLeftRight==1 && !settings.swipeExit)){
|
||||
--page; if (page<0) page=maxPage;
|
||||
buzzShort();
|
||||
drawPage(page);
|
||||
}
|
||||
};
|
||||
|
|
@ -123,8 +133,10 @@
|
|||
drawIcon(page,i,true && !settings.direct);
|
||||
if (selected>=0 || settings.direct) {
|
||||
if (selected!=i && !settings.direct){
|
||||
buzzShort();
|
||||
drawIcon(page,selected,false);
|
||||
} else {
|
||||
buzzLong();
|
||||
load(apps[page*4+i].src);
|
||||
}
|
||||
}
|
||||
|
|
@ -134,6 +146,7 @@
|
|||
}
|
||||
}
|
||||
if ((i==4 || (page*4+i)>Napps) && selected>=0) {
|
||||
buzzShort();
|
||||
drawIcon(page,selected,false);
|
||||
selected=-1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "dtlaunch",
|
||||
"name": "Desktop Launcher",
|
||||
"version": "0.23",
|
||||
"version": "0.24",
|
||||
"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",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
showLaunchers: true,
|
||||
direct: false,
|
||||
swipeExit: false,
|
||||
timeOut: "Off"
|
||||
timeOut: "Off",
|
||||
interactionBuzz: false,
|
||||
}, require('Storage').readJSON(FILE, true) || {});
|
||||
|
||||
function writeSettings() {
|
||||
|
|
@ -55,6 +56,13 @@
|
|||
settings.timeOut = timeOutChoices[v];
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
/*LANG*/'Interaction buzz': {
|
||||
value: settings.interactionBuzz,
|
||||
onchange: v => {
|
||||
settings.interactionBuzz = v;
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue