Dynamically change a background #348
-
Hello! I'm trying to dynamically override a background color. It's pretty easy to find a theme settings, but how do I change them from my code? I'm not that experienced in C++ so excuse me if that's a trivial question. Thnks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The best starting point we have at the moment documentation wise is https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/themes/rendering-with-themes-icons-grids/ But in summary, if you just want to change the drawing colours, there are a couple of palette entries at the top of the theme header file, you can just change those, they are simply defined as RGB(r,g,b) where each value is between 0..255. If you wanted to change the selected colors, you'd search for If you wanted to change the color of a single menu, see the |
Beta Was this translation helpful? Give feedback.
The best starting point we have at the moment documentation wise is https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/themes/rendering-with-themes-icons-grids/
But in summary, if you just want to change the drawing colours, there are a couple of palette entries at the top of the theme header file, you can just change those, they are simply defined as RGB(r,g,b) where each value is between 0..255.
If you wanted to change the selected colors, you'd search for
factory.setSelectedColors
and adjust those RGB values. That should be it.If you wanted to change the color of a single menu, see the
esp/ESPAmplifier
example, it does that for the status menu I think.