Manipulating Slate content during and after Construct()

StrangerGwenn
Sat, 05 Apr 2014 20:35:36 +0000
UI

Hi,

I am getting started with the Slate framework. I have created various UI components, set up style, callbacks, etc. Now I want to go a little further and I am stuck on two things.

The first question is about updating FSlateBrushes. I have a big menu with a few of those, I want to hide/show the menu. That is easy but I also want to change the brushes each time I show the menu. Of course, I could simply destroy and Construct the menu again each time but this is going to happen every few seconds, I think there is a better way. How can I change FSlateBrushes after they’ve been constructed ?

More generally, how can I re-initialize or delete content that was declared with SNew ? Should I use SEssignNew then Reset() the reference ?

The second question is a bit more trivial. What would be the syntax for using SNew in a for loop inside ChildSlot[], or even deeper into the Construct() (e.g. in a box slot, etc) ?

Thanks !

12 posts - 1 participant