UMG - How to change text color with OnUnhovered?

I’m working on making a main menu, having a small problem.

My blueprint for changing the text color OnHover works fine, but the OnUnhovered seems to do nothing (text stays green from the OnHover event)

What am I missing here?

Using a button with a text child

Hi!

You need to bind function to “Color and Opacity” and use it.

Inside this function you need to create two boolean variables and use them to change color.

You must create events that will allow you to set the needed values for the logical variables in the Event Graph.

Alternate method - you can to bind variable instead function.

THANK YOU! I went the variable route. Took me a minute to realize I needed to make the variable type slate color, but after that it was a breeze.

This is seriously the proper solution to make text acting like buttons? There’s no way to inherit the color the text parent’s button? Text buttons are not something enough common?

If you have 20 text buttons in your UI, you have to use 20*2 events in your graph?

1 Like