Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    Code:
    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.
    Last edited by mrjookie123; 10-27-2020, 10:38 AM.
Working...
X