set theme to light, add black as an option for foreground color

pull/3309/head
Paul Arguillère 2024-03-28 11:27:36 +01:00
parent 650add7c84
commit 852e25b189
2 changed files with 31 additions and 27 deletions

View File

@ -36,6 +36,10 @@ switch (settings.foregroundColor) {
foregroundColor = COLOUR_WHITE;
break;
case 3:
foregroundColor = COLOUR_BLACK;
break;
default:
foregroundColor = COLOUR_BLACK; // to detect problems
break;
@ -144,7 +148,7 @@ function draw() {
}
// Clear the screen once, at startup
g.setTheme({ bg: COLOUR_VPW_GREEN, fg: foregroundColor, dark: true }).clear();
g.setTheme({ bg: COLOUR_VPW_GREEN, fg: foregroundColor, dark: false }).clear();
// draw immediately at first, queue update
draw();
// Stop updates when LCD is off, restart when on

View File

@ -9,7 +9,7 @@
require('Storage').writeJSON(FILE, settings);
}
var foregroundColors = ["Red", "Purple", "White"];
var foregroundColors = ["Red", "Purple", "White", "Black"];
// Show the menu
E.showMenu({
@ -17,7 +17,7 @@
"< Back" : () => back(),
'Foreground color': {
value: 0|settings.foregroundColor, // 0| converts undefined to 0
min: 0, max: 2,
min: 0, max: 3,
onchange: v => {
settings.foregroundColor = v;
writeSettings();