I’m in a process of making a giant roster list that can be drag and drop. I thought I can use “bind onclicked” on my massive array but there isn’t anyway to tell apart each button (that I know of).
Is there a way to get a self reference on each button? Or some workaround? I read somewhere you can do it in c but I only know BP.
Exactly what I’m doing but how do you get it to tell you which button is being pressed? When pressed they all do the same custom event through bind onclicked. I just need them to say I’m button 0, the next one button 1 and so on.
Edit: Forgot to mention I’m not spawning Blueprints but adding components within my blueprint. I might have to make it a blueprint since its the only way I can think of to pass information instead of using bind onclick.
When you’re spawning your widget buttons, instantly add them to an array, then get an int variable in the widget button and store the current index of the array in that int. Each button will have its position in the array of button in memory. Then when clicking on your widget button, it calls an event on your player controller (for instance) which pass as parameter the index of the button (so the controller knows what button has been clicked in its array of buttons).