widgetuibuttonunreal-blueprint

Unreal engine execute event if ANY button on UI widget is pushed/clicked. [Blueprint]


I've found stack overflow to be more useful then the unreal engine community, I'm having an issue with a blueprint where I'm creating buttons based on the data in an array.[get items in array]create buttonsadd buttons to widget so that I can achieve an auto list for the player that looks like this.blueprint creating buttons based of the 3 items in array the problem with this is there's no easy way to create an event like "if any button pressed" - "get button name" without doing a check where clicked and getting the mouse position then checking if UI element is at that position, so I wanted an easier way and found this.

get all objects in widget when mouse clicks the only issue is I cant attach the objects in the array to the "is pressed" node.not compatible is there some way I can have this ignored or filter the array to just have the button objects so it CAN be compatible?


Solution

  • solved using an unique array where each button was added during the lists creation, then connected to a onclick event. on ANY button clicked