I'm working with version 5.1.1 and I need to detect if the right mouse button is holding then popup a window on top of the button(picture) in UMG.
I use input BindAxis in APlayerController:
InputComponent->BindAxis("RightMouseButtonHold", this, &AGamePlayerController::OnRightMouseButtonHold);
And settings in input. Default Viewport Mouse Capture Mode
Then AxisEvent OnRightMouseButtonHold works and it detect holding right mouse button. enter image description here
However, the hover event at the button stops working.
SlotBackButton->OnHovered.AddDynamic(this, &UInventorySlot::OnHovered);
But if I change Default Viewport Mouse Capture Mode, to No Capture. Default Viewport Mouse Capture Mode
Then hover event in button work correct, but BindAxis RightMouseButtonHold not working in 90% times. Sometimes it detect, but on other 90% times it returns 0. Sometimes working
Tell me, please, how to correctly determine the event of holding the right mouse button so that it works as in the UMG interface, and does not reset the hover of the button?
I tried use
InputComponent->BindAxis("RightMouseButtonHold", this, &AGamePlayerController::OnRightMouseButtonHold);
and blueprint Any Key function.