Is it possible to add an event for when the mouse is hovering over a scroll box? Like the buttons have?
Yes, it would require some more work as it doesn’t have a specific handle like buttons do. You can still use the Is Hovered node to achieve get it working:
I couldn’t seem to get it to work, the Is Hovered node kept returning false, even though the mouse was hovering on the scroll box, and scrolling it
I tried the code, but replaced the Scroll Box
with a Button
, and it worked. I assume there must be something to do with the widget being a container. I kept trying a variety of solutions and found that this one worked:
I suggest that you perhaps nest the Scroll Box
further to avoid the is hovered triggering on other parent containers.
That worked!
Thank you very much for the help!
I don’t know what the mention of Button is relevant to, but this BP setup worked for me, cheers!
The Get Parent node was pretty essential, without it, the IsHovered would constantly return false.
Glad you got it working! I thought I’d mention that I was using a button because all widgets are not created with the same interfaces and functions as the others.
Shouldn’t this be wrapped in a User Widget and trigger onMouseEnter/Leave instead? Ticking a widget makes it work, sure but… why do it 120 times per second if you can do it once, when needed.
And if an update is needed every frame, then onMouseMove can be overriden.
It should, or some alternative to that as this may be expensive “depending on other factors”.