Hello! I’m having a problem with my buttons not reseting their animation state when switching to different widgets, as they get stuck in the ‘OnHovered’ animation state when a different widget is pushed. Is there any way to have the button animation reset its state or somehow clear it when a different widget is activated?
Many ways to solve it, depends on your interface architecture.
Since we don’t know how its setup, here is a list of high level solution space.
- When a sub menu is open and you switch, on main container there is and event OnWidgetStateChanged. You bind every widget onto this on construct and when changed they always reset animations.
- You can change your structure, think you are using widget switcher or show hide. You can just remove from parent container and add to container every sub widget. Thus they are reset when they come.
- On every sub widget you can bind to its local event on visibility changed, to reset animations. OnVisibilityChanged->GetAllChildren->ForEach->SetButtonState Unhovered.
If this is not helpfull please do define what is happening when you press a button and sub menu opens in detail.