Page 1 of 1

[0.12.19] crash: change textfield.style.font_color

Posted: Thu Nov 26, 2015 9:29 am
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

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

Posted: Thu Nov 26, 2015 10:47 am
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.

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

Posted: Thu Nov 26, 2015 10:56 am
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.

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

Posted: Wed Dec 02, 2015 4:24 pm
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 :)