How to setup styles for multiple states

How to setup styles for multiple states?
For example I have a button that i need to have two styles:

  • defualt
  • checked or pressed or focused

As I understand using LV_STATE_CHECKED | LV_STATE_PRESSED | LV_STATE_FOCUSED applies that style if button currently has all of the three states.

So I need to write lv_style_set_bg_color three times for each state I want?

That is the correct approach, as far as I know.

1 Like