2022-02-02 23:34:12 +00:00
|
|
|
const SETTINGS_FILE = "torch.json";
|
2022-02-03 00:01:40 +00:00
|
|
|
let settings;
|
2022-02-02 23:34:12 +00:00
|
|
|
|
|
|
|
function loadSettings() {
|
|
|
|
settings = require("Storage").readJSON(SETTINGS_FILE,1)|| {'bg': '#FFFFFF', 'color': 'White'};
|
|
|
|
}
|
|
|
|
|
2022-02-03 00:07:08 +00:00
|
|
|
loadSettings();
|
|
|
|
|
2022-09-19 13:21:14 +00:00
|
|
|
Bangle.setLCDBrightness(1);
|
2020-03-03 15:59:00 +00:00
|
|
|
Bangle.setLCDPower(1);
|
|
|
|
Bangle.setLCDTimeout(0);
|
|
|
|
g.reset();
|
2022-11-09 10:26:49 +00:00
|
|
|
g.setTheme({bg:settings.bg,fg:"#000"});
|
2022-02-02 23:34:12 +00:00
|
|
|
g.setColor(settings.bg);
|
2020-03-03 15:59:00 +00:00
|
|
|
g.fillRect(0,0,g.getWidth(),g.getHeight());
|
2022-11-05 23:48:38 +00:00
|
|
|
Bangle.setUI({
|
|
|
|
mode : 'custom',
|
2022-11-10 15:43:47 +00:00
|
|
|
back : load, // B2: SW back button to exit
|
|
|
|
btn : ()=>{load();}, // B1&2: HW button to exit. // A simple 'load' as on the line above did not work for btn???
|
2022-11-05 23:48:38 +00:00
|
|
|
});
|