Set button state depending on boolean variable

Hello.

With the new variables and advanced prototyping, is there a way to achieve the following.

  • I have a navigation button in 4 states: Default | Hover (on hover) | Active (while clicking) | Selected

  • Now, I want to prototype that button in a way that, from Default and from Selected I come to the Hover state on the action of “while hover” → easy

  • Then I want to arrive on the Active state from hover on the action of “while pressing” → easy

  • Finally I want to go to either the default or the selected state depending on which state I came from. If I come from default → go to selected and vice versa.

I feel this should be possible but I am not sure. My hunch is that I need a boolean variable to specify if selected: true / false and depending on this state change to the variable. But I can’t set this up.

Thx for any tips

image

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.