text.lua 406 B

123456789101112131415161718
  1. -- STATIC TEXT
  2. goo.text = class('goo static text', goo.object)
  3. function goo.text:initialize( parent )
  4. super.initialize(self,parent)
  5. self.text = "no text"
  6. end
  7. function goo.text:draw(x,y)
  8. love.graphics.setColor( unpack(self.color) )
  9. love.graphics.print( self.text, x, y )
  10. end
  11. function goo.text:setText( text )
  12. self.text = text or ""
  13. end
  14. function goo.text:getText()
  15. return self.text
  16. end
  17. return goo.text