Holding mousebutton prevents IsHovered from triggering
I'm trying to create a ring of buttons which appears at the mouse cursor while holding rightclick, the buttons (categories) can then expand into submenus with more buttons (actions) when hovered over, and releasing rightclick over a button selects it.
I'm having an issue however: Holding rightclick disables the expansion of a button into a new sub-menu, I have no idea why and can't find anything on the topic.
In other words: holding the right mousebutton down prevents the IsHovered condition from becoming true. Is there any way around this?
Player Controller draw context menu Widget Blueprint
asked Jul 04 '17 at 01:03 AM in Blueprint Scripting
Perhaps create two booleans -- rightMousePressed and rightMouseReleased. Set both to false. When the right mouse is pressed, set rightMousePressed to true. When the right mouse is released, set rightMouseReleased to true.
During the event Tick, check and see if rightMousePressed is true. If so, spawn the widget and set rightMousePressed to false.
From there, you'll need to run your hover logic but this time check and see if rightMouseReleased is also true. If both are true, then do whatever you need to.
answered Jul 04 '17 at 01:26 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here