What is the best way to create a Custom Button?

I’m trying to create a custom button. I have an overlay with a background image, a gradient image, text, and a button. A few of these components are animated.

The problem is that I don’t know how to add events to the top level component and have it act like a button. Could I be going about this the wrong way?

custom button.PNG

I do things a similar way, and all I need to do to get it to work, is create an Event Dispatcher in the button widget. On Button Press/Click, just call the event dispatcher you created.

Now when you add the button widget to another widget, you should see ‘On Button Pressed/Clicked’ when you select it as if it were a normal button.

If you wanted, you could do the same thing for ‘On Hovered / UnHovered’ etc.

Thanks! It worked. I didn’t realize that the event dispatcher on the inner button could be exposed that way.