Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devtools/Dave's Test Kit/DrawableFontObject.py
diff options
context:
space:
mode:
authorjlew <jlew.blackout@gmail.com>2010-08-05 02:27:54 (GMT)
committer jlew <jlew.blackout@gmail.com>2010-08-05 02:34:17 (GMT)
commita40c23156be43a23df3f93eb0355cd4f21763233 (patch)
tree5a852419761143ceeada401867825c534eeb31d7 /devtools/Dave's Test Kit/DrawableFontObject.py
parent4e706cac2b99b7eb4b98bd55d5a28da728d4cf39 (diff)
parent50df09bbfa69fe00b16ea8ec9ceabadba5ce7d08 (diff)
Merge branch 'animationrework'
Conflicts: MAFH2/BattleEngine.py
Diffstat (limited to 'devtools/Dave's Test Kit/DrawableFontObject.py')
-rw-r--r--devtools/Dave's Test Kit/DrawableFontObject.py16
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..425d572
--- /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=(255,255,255)):
+
+ self._images[0] = self.font.render(newText, True, color)
+ self.image = self._images[0]