I have another question, this time regarding FlxText.
Lets say I have a line of text like this:
var text2 = new flixel.text.FlxText(0, 60, 0, "Button presses: [" + statPointsRemaining + "].", 8);
What would be the simplest way for me to update the number after Button presses? (The button being an actual UI button, not some key press.)
(...also, could someone point me in the direction of this forum's formatting? It seems standard BBCode such [code][/code] doesn't work here.)
In the update function
text2.text = "Button presses: [" + statPointsRemaining + "].";
Would I be able to use a similar method for updating the text on buttons?
@vulpicula yep it does :)
@pxshadowhf Awesome. So something like buttonname.button = "Click me! ...or don't.";?
Also, how do you format the code in the forum? I've yet to figure that out. As you can tell I'm not the brightest cookie in the shed. :p
It would be
buttonname.text = "Set text";
and in order to format code on the forum you use 3 " ``` " at the top and bottom of the code
`` <- extra " ` " and that key to make that charachter is right above tab left side of keyboard
It seems standard BBCode such [code][/code] doesn't work here
It's Markdown, like on GitHub and StackOverflow.