I have menu system created in UMG. It allows mouse, keyboard and gamepad inputs. The thing is, I would like the mouse cursor to disappear when a gamepad is in use. To me it seems logical to test a keypress and check if that came from a gamepad or not. If it does, hide the mouse cursor!
Now I am probably missing something or there is something I don’t understand! When navigating the menu with a gamepad the left stick and d-pad moves the focus field around to the individual buttons and the ‘face button down’ is used to “click” on a button. This override function works with all the other keys, but not the ones used to control the menu.
Is there a way to do a similar check on the left stick, d-pad and ‘face button down’ in a widget blueprint (or include them in this function)? Or is there another way to do this?
With Input Mode: Game and UI you can’t hide the mouse cursor by setting Show Mouse Cursor tho. I’m trying to figure out how that would work… I can’t hide the cursor when the gamepad is used.
You might want to turn game-only input back on when you detect gamepad input since you won’t be using the cursor that handles ui input anyway (I presume) I toggle to game-only input and then hide cursor when any gamepad input is detected, and toggle back to game&ui mode as soon as any non gamepad input is detected.