Skip to main content
Question

Set button state depending on boolean variable

  • July 14, 2023
  • 1 reply
  • 1563 views

Stephan3

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

This topic has been closed for replies.

1 reply

  • 0 replies
  • August 13, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings