Hello everyone. I have a few buttons on a simple LVGL page I created. I want the buttons to change colours (and stay changed) when I click on them. I then want the colour to change again when I click on it a second time. So basically I want the button to load up with a default colour, then when pressed it should switch to another colour (signifying it is in a different mode), then when pressed again, to go back to the original colour.
I found out how to change colour based on pressed, focused, etc states, but none seem to do what I need it to do. I was thinking of manually changing the colour of the button in the button object callback function (this function is called whenever the button is pressed), but I don’t know how to manually change the colour whenever I want.
Can someone tell me if there is a way to do this?