Page 1 of 1

[0.16.x] set custom gui style

Posted: Fri Dec 15, 2017 5:44 am
by osldgoth
are we no longer able to set a custom style for gui?

I have in my code "data.raw["gui-style"].default.foo = {...}"

and the game gives me this error: "error while loading gui-style prototype 'default' (gui-style): Parent style not found: [foo]".

what I find odd though I've looked at another mod which uses the same code: "data.raw["gui-style"].default.bar = {...}", and it works fine. so I don't know.

Re: [0.16.x] set custom gui style

Posted: Fri Dec 15, 2017 1:41 pm
by Helfima
osldgoth wrote:....Parent style not found: [foo]"..
your style must have a named property= parent
sample

Re: [0.16.x] set custom gui style

Posted: Fri Dec 15, 2017 4:11 pm
by osldgoth
The style(s) in question did have a named property 'parent', though was set to an invalid name, ending with "_style". removed the _style and it works now. thanks