draw(TextObject) won't update color of TextObject?
Posted: Tue Feb 14, 2017 3:28 am
Hi guys,
I'm having an issue whereby I want to conditionally change the color of some of the text in my ui, which is made up of TextObjects in a table, and drawn using a for loop. I'm not sure what's going wrong, but I suspect that either:
- love is only drawing the for loop once, not updating it regularly, so the changes to the TextObject variable aren't being drawn
- hump.timer is messing around with my conditional statement (though i implemented another way to change the color using a keypress rather than a conditional statement, so I don't think it's that)
- unknown
Any advice you have would be appreciated please find attached below the code I am using (apologies that it's zipped, it's the only away my internet would let me upload it). To find the bug, move the player using the arrow keys up onto the red "U" and press either "d" or "i". Either 'should' result in colors being changed somewhere.
Thanks in advance
I'm having an issue whereby I want to conditionally change the color of some of the text in my ui, which is made up of TextObjects in a table, and drawn using a for loop. I'm not sure what's going wrong, but I suspect that either:
- love is only drawing the for loop once, not updating it regularly, so the changes to the TextObject variable aren't being drawn
- hump.timer is messing around with my conditional statement (though i implemented another way to change the color using a keypress rather than a conditional statement, so I don't think it's that)
- unknown
Any advice you have would be appreciated please find attached below the code I am using (apologies that it's zipped, it's the only away my internet would let me upload it). To find the bug, move the player using the arrow keys up onto the red "U" and press either "d" or "i". Either 'should' result in colors being changed somewhere.
Thanks in advance