Download

UMG Question: Event fire when button is released?

Hey all,

Quick question with Unreal 4’s UMG System, I am new to UMG so this might be a simple question.

I have a touch input game that involves a pie menu when you press and hold on the character. When you hold on the character, the pie menu pops up. You then drag your still held finger to a button, and when you release on the button, the menu goes away, and that button activates something, like a weapon switch or an item usage.

Problem is, is that the ‘On Released’ event will only fire if you clicked the button before hand. It won’t fire if you clicked NOT on the button, and then drag over it and then release. How would I be able to get a system like I described above working?

Thanks in advance,

~Steven Walther Media

Thought I’d bump this.

Could you create the buttons as their own separate widgets (which you can then place into the main UMG widget)? Then you can use each buttons OnMouseEnter and OnMouseLeave events to detect which button the cursor is hovering over (maybe store a boolean or a custom enum to flag which button is being hovered over). Once the menu is closed you can then check to see which button was flagged and then perform the appropriate response.