Scenario:
The item you see here is composed of the following:
These are bound in C++ to a widget object.
Code in the widget to bind
I had this in NativeConstruct as well with same result (it does’t work).
The function its calling is just printing to the log saying it printed.
The AddDynamic is commented out because it throws compiler errors stating it can’t find AddDynamic which research shows me is because OnMouseButtonDownEvent is not of type EventHandler, but of type Event.
Click this button does nothing. Clicking this button or anywhere on the UI shoots right through the UI element and hits the actors underneath (as you can see, the blue circle around the pawn indicates it was selected by clicking on the button which it should not do).
I tried creating a binding in blueprint to the mouse down as well on the imge:
This breakpoint is never hit nor is the string its supposed to print to the screen ever printed.
I conclude that this widget is never receiving mouse input.
Research does not show much but the same answer: Make sure that it is enabled and visibility is set to receive input
There is the behavior all the way down from widget to image. Enabled and visible. (default was not hit testable - that did not solve my problem)
My ask here is -
- what else do you need to do to have this widget block clicks to elements underneath it
- what do you need to do to have the image here receive mouse input and bind its mouse down to a function so that I can work with it when its clicked?