Maybe I’m blind but I can’t find it. What are the Mouse Click and Release events that do not involve hitboxes (like AHUD::ReceiveHitBoxRelease). I’ve noticed that ReceiveHitBoxRelease doesn’t fire if the mouse is no longer in the hitbox after a click. Is there a global mouse release somewhere?
EDIT: I see this available in the HUD blueprint, I’m trying to find the equivalent code
When you say equivalent code, you mean how to Bind those actions in C++?
In your HUD code, you would want to construct a UInputComponent and assign it to InputComponent, and then call BindKey on it.
I’m going to jot down a note to look at/think about whether ReceiveHitBoxRelease should be called even if you’re no longer over a HitBox and just provide None as the name.
Yes, I wanted to know how to do “Left Mouse Pressed/Released” in code. I will read up on UInputComponent and try that.
I don’t know your architecture, but isn’t the bConsumeInput bool there to prevent the input to bubble up to the next level of priority? I was thinking that you should have catch all events at the end of the bubbling up chain, maybe as a static event you could subscribe to?
EDIT: Or have OnClick and OnRelease equivalents implemented in UObject as catch-alls. Probably with different names tho to avoid conflicts with AActor::OnClick/OnRelease