For those interested: while playing around with theming, I made the following theme display
let ScreenWidth = g.getWidth(), CenterX = ScreenWidth/2; let ScreenHeight = g.getHeight(); g.reset(); // automatically loads current theme g.clearRect(0,0, ScreenWidth,ScreenHeight); g.setFont12x20(); g.setFontAlign(0,-1); g.drawString('current Theme', CenterX,0); g.setFontAlign(-1,-1); let Theme = g.theme; g.setColor(Theme.fg); g.drawString('fg', 0,35); g.drawString('bg', CenterX,35); g.drawString('fg2', 0,70); g.drawString('bg2', CenterX,70); g.drawString('fgH', 0,105); g.drawString('bgH', CenterX,105); g.drawString('dark', 0,140); g.setColor(Theme.fg); g.fillRect(40,35, 70,55); g.setColor(Theme.fg); g.drawRect(CenterX+39,34, CenterX+71,56); g.setColor(Theme.bg); g.fillRect(CenterX+40,35, CenterX+70,55); g.setColor(Theme.fg2); g.fillRect(40,70, 70,90); g.setColor(Theme.fg); g.drawRect(CenterX+39,69, CenterX+71,91); g.setColor(Theme.bg2); g.fillRect(CenterX+40,70, CenterX+70,90); g.setColor(Theme.fgH); g.fillRect(40,105, 70,125); g.setColor(Theme.fg); g.drawRect(CenterX+39,104, CenterX+71,126); g.setColor(Theme.bgH); g.fillRect(CenterX+40,105, CenterX+70,125); g.setColor(Theme.fg); g.drawString(Theme.dark ? 'yes' : 'no', 50,140);
1 Attachment
@Andreas_Rozek started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
For those interested: while playing around with theming, I made the following theme display
1 Attachment