diff options
author | davesilver <nibor123@gmail.com> | 2010-08-03 15:45:01 (GMT) |
---|---|---|
committer | davesilver <nibor123@gmail.com> | 2010-08-03 15:45:01 (GMT) |
commit | f5fcc5abb6408a264474380b53c9e2fd7a37bfda (patch) | |
tree | bcbc290b6f8029eb4b641c64ec5ff040211d3331 /devtools/Dave's Test Kit/DrawableFontObject.py | |
parent | bcf5f134c6750e9952939a95c80d1667fe50ef62 (diff) |
Working on integration
Diffstat (limited to 'devtools/Dave's Test Kit/DrawableFontObject.py')
-rw-r--r-- | devtools/Dave's Test Kit/DrawableFontObject.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/devtools/Dave's Test Kit/DrawableFontObject.py b/devtools/Dave's Test Kit/DrawableFontObject.py new file mode 100644 index 0000000..038d791 --- /dev/null +++ b/devtools/Dave's Test Kit/DrawableFontObject.py @@ -0,0 +1,16 @@ +import pygame
+from DrawableObject import DrawableObject
+
+class DrawableFontObject(DrawableObject, pygame.sprite.Sprite):
+
+ def __init__(self,text,font, x = 0, y = 0):
+
+ self.font = font
+ self.textImage = font.render(text, 1, (255,255,255))
+ #self._image = self.textImage
+ DrawableObject.__init__(self, [self.textImage], '')
+
+ def changeText(self, newText, color=(0,0,0)):
+
+ self._images[0] = self.font.render(newText, True, color)
+ self.image = self._images[0]
|