Page 1 of 1

GUI-Element Font-Properties in 0.5.2

Posted: Wed Jun 26, 2013 12:26 pm
by DexterNemrod
Seems like I have a problem to set the font of my GUI-Label in the new version.
I use basically:
game.player.gui.left.add{type="label", name="myLabelName"}
game.player.gui.left.myLabelName.font={[my Font Defines i.e. color, bold]}

And the system seems to have problem find the .font-property of my label-object, giving me an error message at the beginning of the game (and refusing to start)

Everything else works fine (that is, if I comment out the line that sets the font, my clock works like expected)
[Fortunately the default font color now seems to be light grey, so, if there is no solution I might just use (and upload) the version that doesn´t define the font])

Re: GUI-Element Font-Properties in 0.5.2

Posted: Wed Jun 26, 2013 1:53 pm
by kovarex
The font is specified using the style.

Examples to set font and fontcolor:
https://forums.factorio.com/wiki/inde ... Style#font

Re: GUI-Element Font-Properties in 0.5.2

Posted: Wed Jun 26, 2013 2:17 pm
by DexterNemrod
Ah, thanks, that solved it :)