I have noticed that if I initiate a menu, once returning to my normal screen render, text is offset slightly on the y axis. I assume this is due to the menu setting up some font settings.
Is theming always global?
If it is, has there been any discussion about making it scope specific? So if you have a function and you set the forecolour or font etc within that function, anything rendered to screen from that scope (the function and sub functions) uses that theming.
This seems like a sensible approach to me as as I build up my app and have "renderSomeThing" type methods, if I have scope specific colouring I either have to make sure every single render method sets the theme, which makes it hard to make compiler safe code. Or every method which changes something needs to call a theme reset at the end.
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.
I have noticed that if I initiate a menu, once returning to my normal screen render, text is offset slightly on the y axis. I assume this is due to the menu setting up some font settings.
Is theming always global?
If it is, has there been any discussion about making it scope specific? So if you have a function and you set the forecolour or font etc within that function, anything rendered to screen from that scope (the function and sub functions) uses that theming.
This seems like a sensible approach to me as as I build up my app and have "renderSomeThing" type methods, if I have scope specific colouring I either have to make sure every single render method sets the theme, which makes it hard to make compiler safe code. Or every method which changes something needs to call a theme reset at the end.