Download

FInputModeGameAndUI hold LMB in-game to show UMG widget and interact with widget doesn't work

Hi,
In C++ I am using FInputModeGameAndUI and holding LMB in the game to show UMG widget and once LMB is released then close the widget.
This works ok, however I have buttons in the widget I would like to fire OnHover and other widget events while holding LMB triggered from the game, but it doesn’t seem to work, only tooltip is being displayed on the button widget.

How to make this work to hold mouse -> show menu widget -> mouse hover the button widget and release button to click this button?

Thanks.

EDIT:
What actually works is after handling LMB Press and opening UMG widget I explicitly call


PlayerController->SetInputMode(FInputModeGameAndUI());

which is same as it was before, but this somehow unblocks mouse pressed event and I now get OnHover events firing in UMG.

But this seems like a ‘strange’ solution.