How do I make a clickable image?

Hello guys, I would like to know how i can make an image in UMG can be clickable and call another widget when clicked

Help me plx!
(and sorry my bad english)

Hello,

Instead of using an image, you can just add an image to a button. Then, you can call the OnClicked function of the button, and perform your call from there.

Here is a screenshot of the button’s Details panel, where you can find the option to set the image:

But how would you then switch the image at runtime in blueprints? The image can be changed via blueprints but the button can’t. For example a play button would change its image to pause. So instead of having 2 buttons you would have a toggle and switch the image out. I don’t see how to do this without a huge set up

Create two slate brushes with the relevant texture.
Slate brushes are created by right clicking on the content browser>User interfaces>Slate brushes. Then you just add the play texture in one slate brush and the stop texture in the other slate brush.w
Then do the following:

The make style node was created by dragging the in style pins and searching for make style node while the stop and play variables where created by dragging out the normal pins from the make style node and promoting them to variables and then setting the default value to the relevant brushes.