Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devtools/CompleteTestKit/DrawableFontObject.py
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/CompleteTestKit/DrawableFontObject.py')
-rw-r--r--devtools/CompleteTestKit/DrawableFontObject.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/devtools/CompleteTestKit/DrawableFontObject.py b/devtools/CompleteTestKit/DrawableFontObject.py
new file mode 100644
index 0000000..dbd5d65
--- /dev/null
+++ b/devtools/CompleteTestKit/DrawableFontObject.py
@@ -0,0 +1,14 @@
+import pygame
+from DrawableObject import DrawableObject
+
+class DrawableFontObject(DrawableObject, pygame.sprite.Sprite):
+
+ def __init__(self,text,font,fps = 10, x = 0, y = 0, xVelocity = 0, yVelocity = 0):
+
+ self.font = font
+ self.textImage = font.render(text, True, (0,0,0))
+ DrawableObject.__init__(self, [self.textImage], '', fps, x, y, xVelocity, yVelocity)
+
+ def changeText(self, newtext):
+
+ self._images[0] = font.render(newText, True, (0,0,0))