GUI-Element Font-Properties in 0.5.2

Place to get help with not working mods / modding interface.
Post Reply
DexterNemrod
Inserter
Inserter
Posts: 31
Joined: Mon May 13, 2013 12:54 pm
Contact:

GUI-Element Font-Properties in 0.5.2

Post 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])

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: GUI-Element Font-Properties in 0.5.2

Post by kovarex »

The font is specified using the style.

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

DexterNemrod
Inserter
Inserter
Posts: 31
Joined: Mon May 13, 2013 12:54 pm
Contact:

Re: GUI-Element Font-Properties in 0.5.2

Post by DexterNemrod »

Ah, thanks, that solved it :)

Post Reply

Return to “Modding help”