How to disable mouse clicks in UI?

Currently, if I click the left mouse button whatsoever, my entire menu breaks due to focus being removed from the UI’s buttons. How can I disable this? My UI is only intended to be used with keyboard and controller inputs, no mouse cursor at all.

HI @papa335678 ,
If you want the mouse to be visible on screen but prevent clicks from working, you can use the Set Visibility node in the Event Construct and set it to Not Hit-Testable (Self and Children). This way, the cursor is displayed but it won’t interact with anything.

You can also use Set Input Mode UI Only to restrict input exclusively to the UI you need. Later, when you want to return control back to the game, remember to call Set Input Mode Game Only and adjust the mouse state with Set Show Mouse Cursor as needed.

Hope it help!

1 Like

This still doesn’t fix my issue, the mouse still removes focus from the menu. The UI appears to have default controls (Enter/LMB = accept, Arrow Keys = navigate.), where can these binds/actions be changed? Surely there’s a way to change this default functionality, unless I’m misunderstanding something.

This is a rather janky brute force fix, but I suppose it’ll do for now. I’m shocked that these binds aren’t editable somewhere obvious.

When the widget loses focus, focus is set to an arbitrary button to keep menu navigation/interaction working.

1 Like