Changing text outline color using blueprints

Basically is it possible to change the outline color of a text using blueprints? For example when you hover a button.
4r.png

Hi, set the outline color to white, then create a new material and assign that as the Outline Material.

dynamic_outline_color.png
Then when you construct the widget use the “Get Dynamic Outline Material” on the text and save the output into a variable. Then you can change the color of the material if you set it to a parameter in the material editor (so “Set Vector Parameter Value” from the material you saved earlier into a variable)
outline_mat.png

Um… I don’t know if I’m doing it wrong but I can’t use the “get dynamic outline material” in any way. Is it not supported on 4.16? (cuz that’s the version I’m using)

I’m using this only since 4.24 so I don’t know whether or not this will work with earlier engine versions.

Also you have a “Text Reference” I have a “Text Object”


What text are you using? I’m using plain text
text_I_used.png

Also you could try setting the font every time you want to change the outline color (but can’t guarantee that those nodes exist in 4.16)

4 Likes

1 Ye this node just doesn’t exist in 4.16
2 I’m using the same thing it just looks different in 4.16
3 I’ve tried using that method… but it just doesn’t update after changing once (while other variables do)

Can you show your code how you set the outline color? And you have to run this whole code every time you want to change the Outline Color (so I would make a new function, called something like “Set New Outline Color”, and input a linear color there, and you would have to call that function every time you want to change the Outline Color)

And the rest clearly works cuz for example the element image and element name are updating every time and outline color is always what I first set it to.

Try printing the color, so in the function print the “Color” you plug into “Outline Color” and see if the “Color” changes.

It seems like it does…I have no clue why the outline doesn’t work…Bez tytułu.png

What I would try next is building a minimal widget and set the color there.
So a blank widget that only contains one single text -> crank up the outline size of the text and on construct of the widget set the outline color to something different and see if that works (with and without a delay node between the construct and the set outline color, shouldn’t make any difference but just to be sure).

Ok um, I just made it so the text will change and the outline will stay the same. it looks fine that way too… It was just all too buggy… but thank you for your help ^^

Had this same problem recently. Here is the simple solution: create a slate font info variable: this has outline settings in it. Then use the Set Font function and set it to your variable when hovering.

1 Like