I'm trying to make my touch UI support game controllers.
Currently each UI button is actioned using "on tap" which works for touch and mouse.
I've created an array that maps each button to the next button the cursor should move to if the gamepad d-pad is moved left/up/right/down.
When the cursor moves, it sets a global variable ("UIButton") to the name of the button it's moved to.
So what I want is:
on tap "buttonX" or (on gamepad Button A pressed & UIButton = "buttonX") -> do something
But I can't figure out how to do it in event blocks. Feels like it should be obvious and I'm dumb.
Don't think I can use "evaluate expression" with triggers.
So the only other way I can think is to create functions for all the "do somethings" and call them in separate triggers (one for touch/mouse & one for controller/keyboard).