Comply w FW changes

pull/2253/head
thyttan 2022-11-09 23:34:40 +01:00 committed by GitHub
parent 4758d2b71f
commit 4a2342fb55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -11,14 +11,16 @@ Bangle.setLCDBrightness(1);
Bangle.setLCDPower(1);
Bangle.setLCDTimeout(0);
g.reset();
bgBackup = g.theme.bg;
g.setTheme({bg:settings.bg,fg:"#000"});
g.setColor(settings.bg);
g.fillRect(0,0,g.getWidth(),g.getHeight());
Bangle.setUI({
mode : 'custom',
back : load, // B2: Clicking the hardware button or pressing upper left corner turns off (where red back button would be)
btn : (n)=>{ // B1: Any button turns off
if (process.env.HWVERSION==1 && (n==1 || n==2 || n==3)) {
back : ()=>{g.setTheme({bg:bgBackup});load();}, // B2: SW back button
btn : (n)=>{ // B1&2: Any HW button turns off
if (n==1 || n==2 || n==3) {
g.setTheme({bg:bgBackup});
load();
}
}