[0.12.19] crash: change textfield.style.font_color

This subforum contains all the issues which we already resolved.
Post Reply
gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

[0.12.19] crash: change textfield.style.font_color

Post by gheift »

Changing the the font_color of a textfield crashes.

Code: Select all

do local tf = game.player.gui.add.left.add{type = "textfield"} tf.text = "text" tf.style.font_color = {r = 1} end
This can be reproduced by running this script in a new game in the console.

Thanks,
Gerhard

PS: Thanks for fixing the underground belt bugs.
crashlog

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.12.19] crash: change textfield.style.font_color

Post by posila »

Thanks for the report. Fixed for next release.
However, it is not supported to set font color on textfields, so it will not work.

gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

Re: [0.12.19] crash: change textfield.style.font_color

Post by gheift »

posila wrote:Thanks for the report. Fixed for next release.
However, it is not supported to set font color on textfields, so it will not work.
So the color of the text is black everytime? I would like to change it to red if the text is e.g. not a valid integer.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.12.19] crash: change textfield.style.font_color

Post by posila »

You could try defining style with changed font_color and change whole style in runtime, but I don't know if that will work from top of my head. Maybe color of font in textfield can't be changed at all :)

Post Reply

Return to “Resolved Problems and Bugs”