Closed mgkr closed 3 years ago
Yes... this is a deficiency I've known about for a while. However, I'm not going to fix it, because I'm rewriting the GUI module and element templates are going away entirely. I recommend avoiding them and instead using a builder function or other alternative.
I recommend avoiding them and instead using a builder function or other alternative.
Woa - Thanks for the heads up!
Any approximate timeframe idea for that re-write? Just so I have an idea if I should wait for it - or "roll-my-own" (I'm in no rush)
Lol, the rewrite is hard. I am currently on my seventh attempt, with the previous attempts ranging from slightly more than the current module to a full-blown reactive GUI framework. My newest attempt is a streamlined version of the current module, with some helper functions for updating existing GUIs and things related to lists.
The rewrite won't come out until after Factorio 1.1 releases, since it relies on new GUI-related features coming in that version.
If I have something like
and then somewhere else have an element like
Then the template
style_mods
(specificallyfont_color
) no longer works - I assume the whole templatestyle_mod
section is simply ignored or overwritten by the elementstyle_mod
.My expectation would be that individual element
style_mod
values would overwrite the corresponding templatestyle_mod
values - and let the rest (of the templatestyle_mod
) carry through. I.e. a union of the two - with the elementstyle_mod
winning if there is overlap.