bUseMouseForTouch Affecting Button Hover and ListView Scrolling

Hi,

We have upgraded our project from UE 4.27 to UE 5.3 and noticed the following behavior:

  • When bUseMouseForTouch = true, buttons no longer respond to hover events.
  • When bUseMouseForTouch = false, button hover functionality works correctly, but dragging to slide/scroll a ListView using the left mouse button stops working.

Upon investigation, we found that the following check was added in SlateApplication.cpp, which was not present in UE 4.27:

if (IsFakingTouchEvents() && !MouseEvent.IsMouseButtonDown(EKeys::LeftMouseButton))

{

// If we're faking touch events and the left mouse button is not down, do not process the mouse move event

return false;

}

Our requirement is to have both functionalities:

  • Proper hover behavior for all buttons.
  • The ability to slide/scroll a ListView using left mouse button drag

Is removing this conditional check in UE 5 the recommended solution, or is there an alternative approach to achieve both functionalities?

Please let us know if you need any clarification.

Thanks

Steps to Reproduce
Launch provided project:

  1. In project settings enable UseMouseForTouchEvents
  2. Play the project
  3. Hover button in top left corner (Which will not work.)
  4. Scroll list (of green buttons) while pressing left mouse button (not from scroll bar) (which will work fine.)

Now In project settings disable UseMouseForTouchEvents and you will find out you are able to hover button in top left corner properly but not able to Scroll (green buttons) list

Hi,

Removing that check seems like a fine solution if you had something working well and want to revert to the old functionality. We primarily inted bUseMouseForTouch to be used for testing touch controls on PC, so disabling mouse move events while the mouse wasn’t held brought it more inline with what you’d see on a mobile device. Scrollboxes do support right click scrolling by default, so the other option would be to modify that to also accept left click.

Best,

Cody

Hi Cody

Thanks for guidance we shall continue with one of the solutions.

Thanks