mirror of https://github.com/espruino/BangleApps
Merge pull request #375 from ps-igel/upstreamMerge
numerals clock: fixed settings issuepull/373/head^2^2
commit
b8ed7d6ca1
|
@ -1283,7 +1283,7 @@
|
|||
"name": "Numerals Clock",
|
||||
"shortName": "Numerals Clock",
|
||||
"icon": "numerals.png",
|
||||
"version":"0.04",
|
||||
"version":"0.05",
|
||||
"description": "A simple big numerals clock",
|
||||
"tags": "numerals,clock",
|
||||
"type":"clock",
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
0.02: Use BTN2 for settings menu like other clocks
|
||||
0.03: maximize numerals, make menu button configurable, change icon to mac palette, add default settings file, respect 12hour setting
|
||||
0.04: Don't overwrite existing settings on app update
|
||||
0.05: Fix settings issue
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
updateSettings();
|
||||
}
|
||||
let numeralsSettings = storage.readJSON('numerals.json',1);
|
||||
if (!numeralsSettings) resetSettings();
|
||||
if (!numeralsSettings) resetSettings();
|
||||
if (numeralsSettings.menuButton===undefined) numeralsSettings.menuButton=22;
|
||||
let dm = ["fill","frame"];
|
||||
let col = ["rnd","r/g","y/w","o/c","b/y"];
|
||||
let btn = [[24,"BTN1"],[22,"BTN2"],[23,"BTN3"],[11,"BTN4"],[16,"BTN5"]];
|
||||
|
@ -30,7 +31,7 @@
|
|||
onchange: v=> { numeralsSettings.drawMode=dm[v]; updateSettings();}
|
||||
},
|
||||
"Menu button": {
|
||||
value: 1|btn[numeralsSettings.menuButton],
|
||||
value: btn.findIndex(e=>e[0]==numeralsSettings.menuButton),
|
||||
min:0,max:4,
|
||||
format: v=>btn[v][1],
|
||||
onchange: v=> { numeralsSettings.menuButton=btn[v][0]; updateSettings();}
|
||||
|
|
Loading…
Reference in New Issue