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
|
0.22: Bangle 2: Change to not automatically marking the first app on a page
|
||||||
when moving pages. Add caching for faster startups.
|
when moving pages. Add caching for faster startups.
|
||||||
0.23: Bangle 1: Fix issue with missing icons, added touch screen interactions
|
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,
|
showLaunchers: true,
|
||||||
direct: false,
|
direct: false,
|
||||||
swipeExit: false,
|
swipeExit: false,
|
||||||
timeOut: "Off"
|
timeOut: "Off",
|
||||||
|
interactionBuzz: false,
|
||||||
}, require('Storage').readJSON("dtlaunch.json", true) || {});
|
}, require('Storage').readJSON("dtlaunch.json", true) || {});
|
||||||
|
|
||||||
let s = require("Storage");
|
let s = require("Storage");
|
||||||
|
|
@ -89,6 +90,13 @@
|
||||||
g.flip();
|
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.drawWidgets(); // To immediately update widget field to follow current theme - remove leftovers if previous app set custom theme.
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
drawPage(0);
|
drawPage(0);
|
||||||
|
|
@ -100,9 +108,11 @@
|
||||||
if(settings.swipeExit && dirLeftRight==1) Bangle.showClock();
|
if(settings.swipeExit && dirLeftRight==1) Bangle.showClock();
|
||||||
if (dirUpDown==-1||dirLeftRight==-1){
|
if (dirUpDown==-1||dirLeftRight==-1){
|
||||||
++page; if (page>maxPage) page=0;
|
++page; if (page>maxPage) page=0;
|
||||||
|
buzzShort();
|
||||||
drawPage(page);
|
drawPage(page);
|
||||||
} else if (dirUpDown==1||(dirLeftRight==1 && !settings.swipeExit)){
|
} else if (dirUpDown==1||(dirLeftRight==1 && !settings.swipeExit)){
|
||||||
--page; if (page<0) page=maxPage;
|
--page; if (page<0) page=maxPage;
|
||||||
|
buzzShort();
|
||||||
drawPage(page);
|
drawPage(page);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -123,8 +133,10 @@
|
||||||
drawIcon(page,i,true && !settings.direct);
|
drawIcon(page,i,true && !settings.direct);
|
||||||
if (selected>=0 || settings.direct) {
|
if (selected>=0 || settings.direct) {
|
||||||
if (selected!=i && !settings.direct){
|
if (selected!=i && !settings.direct){
|
||||||
|
buzzShort();
|
||||||
drawIcon(page,selected,false);
|
drawIcon(page,selected,false);
|
||||||
} else {
|
} else {
|
||||||
|
buzzLong();
|
||||||
load(apps[page*4+i].src);
|
load(apps[page*4+i].src);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -134,6 +146,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((i==4 || (page*4+i)>Napps) && selected>=0) {
|
if ((i==4 || (page*4+i)>Napps) && selected>=0) {
|
||||||
|
buzzShort();
|
||||||
drawIcon(page,selected,false);
|
drawIcon(page,selected,false);
|
||||||
selected=-1;
|
selected=-1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "dtlaunch",
|
"id": "dtlaunch",
|
||||||
"name": "Desktop Launcher",
|
"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.",
|
"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"}],
|
"screenshots": [{"url":"shot1.png"},{"url":"shot2.png"},{"url":"shot3.png"}],
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@
|
||||||
showLaunchers: true,
|
showLaunchers: true,
|
||||||
direct: false,
|
direct: false,
|
||||||
swipeExit: false,
|
swipeExit: false,
|
||||||
timeOut: "Off"
|
timeOut: "Off",
|
||||||
|
interactionBuzz: false,
|
||||||
}, require('Storage').readJSON(FILE, true) || {});
|
}, require('Storage').readJSON(FILE, true) || {});
|
||||||
|
|
||||||
function writeSettings() {
|
function writeSettings() {
|
||||||
|
|
@ -55,6 +56,13 @@
|
||||||
settings.timeOut = timeOutChoices[v];
|
settings.timeOut = timeOutChoices[v];
|
||||||
writeSettings();
|
writeSettings();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
/*LANG*/'Interaction buzz': {
|
||||||
|
value: settings.interactionBuzz,
|
||||||
|
onchange: v => {
|
||||||
|
settings.interactionBuzz = v;
|
||||||
|
writeSettings();
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue