UMG - How to switch a buttons image(slate widget style)

Hi all…

Im trying to switch a buttons style (slate widget style) in event graph UMG
For example. i have 6 buttons used, displaying a graphics with lvl 1, lvl2, lvl3 and so on… and i have a locked graphic on lvl 2, lvl3 and so on Which is displayed until you have completed the level before it. i have all that already setup.
But im unable to get the graphic to change, i cant seem to find any blueprint node for changing the button’s style widget .

Thanks in advanced for any advice.

I was informed that this will be available definitely in 4.5…

Instead of try to change button’s style, i use an image, set it as the child of the button and change it’s texture at will.

use “Event Construct” , so when UMG is called “Event Construct” is fired first and you can than change textures usingthat node

Did you ever get this resolved? I am trying to do something simillar with a character screen in which characters get unlocked as you play further into the game. I have run into a simillar issue in trying to find a way to show a different image when the character is unlocked. I tried using an image bind, but that doesn’t seem to work properly either. If you figured out how to solve this, could you possibly post how you did it?

This is my method,

1 Like

You should take a look at EVRTOPs answer below,

You can simplify EVRTOP’s answer by taking advantage of the break structure and set members in structure nodes.
This will allow you to change just the image of the button’s normal style without needing to go to the bother of setting all of the other members to the same value.

For reference ‘Character Picture’ is the name of my button and ‘Glamor Shot’ is the name of my image.

Beware, when you add the set members node it will have no member pins. If you right click it there will be an option to ‘restore all structure pins’. You can then right click on your desired pin and select ‘remove all other pins’ to get rid of the cruft.

1 Like

I cannot mimic this structure. For me, Set Members in ButtonStyle has no output, and I cannot find the Set node where I can set the widget style and pass it the button reference. Is this still the way to do this in Unreal 4.8?

Just check, i can still set manually set widget style/ button style in BP, version 4.8. Can you tell me how did you do this? All i need to do is drag the button variable, search for BP node Set style, then from the input node, choose make ButtonStyle.

I did it in 4.9, maybe 4.8 doesn’t have the struct out pin?
If you don’t have a struct out pin, you should be able to reuse whatever you connected to the struct ref pin. So in my case I could drag off of Break Button Style > Normal and connect that to Set members in Button Style > Struct ref

Thanks!!!