controlP5: How to redraw a button?
in
Contributed Library Questions
•
2 years ago
Hello,
I'm sorry for this noob question but
I wanted to create a toggle switch that has 3 different colours: one for off, one for on and one for mouse hover. I used this code:
- if (theFlag == true) {
- runToggle.setColorForeground(0xff33ff66);
- println("run");
- }
- else {
- runToggle.setColorForeground(0xff66ffff);
- }
It's not working indeed, I assumed I need to draw the button again, am I right? If so, how do I do that? I've been browsing the reference but it's just not designed for noobs...
Thanks in advance
1