test_text.py : a bunch of examples on using the text wrapper ( view this file first )
== Usage: ==
in Game.init():
# create regular text, and FPS text
hi = Text('Hi world')
fps = FPSText()
in Game.draw(self):
# draw regular text
self.text.draw()
# draw FPS text, and update it
self.fps.draw()
self.fps.tick()
== Notes ==
Text() is 'smart', meaning it will only render the text if needed. the method .draw() will use a cached version of the render.
Meaning: you can do this, and it only renders once: ( or none if it was already set to that. )
self.text.text="mwhahahaha"
self.text.text="mwhahahaha"
self.text.text="mwhahahaha"