mirror of https://github.com/espruino/BangleApps
Comply w FW changes
parent
4758d2b71f
commit
4a2342fb55
|
@ -11,14 +11,16 @@ Bangle.setLCDBrightness(1);
|
||||||
Bangle.setLCDPower(1);
|
Bangle.setLCDPower(1);
|
||||||
Bangle.setLCDTimeout(0);
|
Bangle.setLCDTimeout(0);
|
||||||
g.reset();
|
g.reset();
|
||||||
|
bgBackup = g.theme.bg;
|
||||||
g.setTheme({bg:settings.bg,fg:"#000"});
|
g.setTheme({bg:settings.bg,fg:"#000"});
|
||||||
g.setColor(settings.bg);
|
g.setColor(settings.bg);
|
||||||
g.fillRect(0,0,g.getWidth(),g.getHeight());
|
g.fillRect(0,0,g.getWidth(),g.getHeight());
|
||||||
Bangle.setUI({
|
Bangle.setUI({
|
||||||
mode : 'custom',
|
mode : 'custom',
|
||||||
back : load, // B2: Clicking the hardware button or pressing upper left corner turns off (where red back button would be)
|
back : ()=>{g.setTheme({bg:bgBackup});load();}, // B2: SW back button
|
||||||
btn : (n)=>{ // B1: Any button turns off
|
btn : (n)=>{ // B1&2: Any HW button turns off
|
||||||
if (process.env.HWVERSION==1 && (n==1 || n==2 || n==3)) {
|
if (n==1 || n==2 || n==3) {
|
||||||
|
g.setTheme({bg:bgBackup});
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue