#Why can I freely add child widgets to a
1 messages · Page 1 of 1 (latest)
Literally just trying to name this widget, and change its color
The menu I duplicated is the PlayerList menu, and I'm trying to change some of the icons / layout there
You should be able to change the color from your SelectionButton with the SCR_SortEelementComponent
As for the name, sadly it wont be an option if its a prefab
And yes the reason you cannot change its color is because SCR_SortEelementComponent is overriding your change
Why do you need to rename this widget ?
Sorry, is that something I have to do in scripting or should I be able to do this from the layout editor? Apologies, very new to Enfusion modding. I don't see a SelectionButton in the example I provided -- are you referring to the sortName ButtonWidget?
There was actually no reason I need to rename this specific widget fwiw. I originally thought that since the color for the icon modify its color. But a generic name makes it a bit more difficult to find :p
Sorry it's late and I'm a bit tired, so to rephrase the root of what I'm trying to do: I am just trying to change the color of a widget contained within this WLib_ButtonSort_text.layout .
the root widget of the prefab (which should be named SelectionButton0 by default - in your case you renamed it to sortName)
This widget will have a component (one of the properties on the right). This component allows you to change colors based on events, play sounds and a few other things. This is where you can do your magic
ahhhhh I see it now.
One of the events is for the Background widget, you could use this one as a template on what you can do
Got it, that makes sense. Thank you for the guidance
I'll give it a go after I figure out this scripting logic. tl;dr of why I'm doing this: i'm basically implementing my own scoring game stats system on top of the existing player listing menu but trying to surface supplies delivered and spent. Figured coloring the supply "delivered" icon as green and "spent" as orange would be a good indicator rather than text
almost got it! remaining pieces are the supply spend per player bug and the icon colors 🙂
in case if your icons feel a bit too flat a trick you can do is to have two image widgets with the same icon but one of them use the imageset glow
btw @formal rampart I was slightly lost at the time but finally dove into the Effects for the widget and figured things out. I'll admit though, I'm unsure if it's the tooling or the states are a bit confusing but I had to do some trial-and-error with toggling the effect events to get the color to override correctly.
But eventually got it!