Above: the widget’s button, when clicked, will trigger the custom event in this blueprint.
You can also create a custom dispatcher and send some data across. This way you can bind multiple buttons to the same event and use said data as a filter, as in:
but I cannot bind to on clicked since the component is complex, it’s not just a button
hence my question of passing a custom event as a parameter that would then be given to the button on clicked action
Any widget can override onMouseDown / onKeyDown. Call the event dispatcher there. Pretty much any native widgets can be interacted with / have focus. No buttons needed, indeed. Buttons often get in the way, actually.
Every time you do something to a widget, a piece (however many registered) of code gets a notification.
Other than that, I don’t understand what kind of callback you’re after.
but I cannot bind to on clicked since the component is complex, it’s not just a button
the idea is that I’ll re use that component many times, so in its parent widget I need to just bind a different function/event/callback whatever so that each button click triggers a different functionality
it’s just a game menu, but I don’t use a plain button component, it’s embedded as the image I posted
so the button onclicked is there, but I should launch a different event from there
if I select my custom widget, there are no mousedown event on it
This is sometimes referred to as autobind - not sure if that’s the correct term. The above is using a single dispatcher for all buttons. If you want multiple unique events, add more dispatchers: