On Jan 28, 2:27 pm, Hordeling <[email protected]> wrote:
> How does one update the text field in a label on the fly, for instance
> in a step method?
Eureka!
After digging around a bit more, I discovered that to change the text
on a label, you must reference element.text
So:
def step(self, dt):
self.elapsed += dt
self.elapsedLabel.element.text = str(self.elapsed)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---