Download

UMG change "onPressed" gamepad mapping?

Hey guys, I’m trying to figure out a very rare case scenario. I need the “pressed button” function on a Widget Button to be mapped to a different button on a gamepad (for some a reason, a certain console decided it was a great idea to swap A and B…)

Regardless of what my Project-Input Settings are, or however many times I try to catch inputs anywhere else in my game, for some reason I cannot set or override the mapping connected to the built in function “onPressed”. It’s like the most protected sacred friggin command, clearly they want it to always be “gamepad face button bottom”.

I can control selecting with ANY OTHER button from my gameplay blueprint, but I cannot override that one, the only way is to setInput to Game only, not UI, which then means I can’t naviage those menus.

Does anyone know of any possible way to change this? or Override it?

I must admit i don’t understand what you want at all.

A widget button has nothing to do with the “onPressed” event of a gamepad button. An “onPressed” event from a gamepad is absolute. You can link that to an input action or directly catch the event from a blueprint like for example the level blueprint. You can put whatever logic you want behind that. It also doesn’t make sense to switch the actual mappings, why would you do that. Let’s say you switch up and down on a gamepad, it would just be hell of a confusing. Rather put your “move up” function on the “onPressed” event of the directional pad down button.

I’m pretty sure you could switch the mappings with C++ or by editing the UE4 source, but i still don’t get why.

Fronzelneekburm, I think you misunderstood the question.

maxxburman is talking about the OnPressed event of a Button Widget. When the button is “Focusable” and has focus, pressing Gamepad Face Button Bottom will call the event. Similarly, pressing and releasing will call OnClicked. There are lots of good reasons to remap this action, including the fact that Switch and PS4 (in some regions) have the “affirmative” button on the right.

I found this thread because I’m having the same issue (among many others) with UMG’s limited gamepad support. :frowning: