diff options
author | Mateu Batle <mateu.batle@collabora.co.uk> | 2010-11-15 02:37:03 (GMT) |
---|---|---|
committer | Mateu Batle <mateu.batle@collabora.co.uk> | 2010-11-15 02:37:03 (GMT) |
commit | 383eeb4d3e48cd81be2827149e299755e5449ae9 (patch) | |
tree | 5eb8656be09eab31244c6668bf152476f7cae4c2 /usmpgames | |
parent | f57ab3583a29bf35d5517d0cec1e10eafeb43bc4 (diff) |
Fixed title
Diffstat (limited to 'usmpgames')
-rwxr-xr-x | usmpgames/infostate.py | 7 | ||||
-rwxr-xr-x | usmpgames/ktextsurfacewriter.py | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/usmpgames/infostate.py b/usmpgames/infostate.py index b0ccbdd..9bf46ee 100755 --- a/usmpgames/infostate.py +++ b/usmpgames/infostate.py @@ -35,12 +35,11 @@ class InfoState(ApplicationState): textobj.update() self.add_image( textobj.area, pos ) - def add_text2(self, text, color, pos, rectsize): + def add_text2(self, text, color, pos, rectsize, font = None): text_rect = pygame.Rect( pos, rectsize ) - textobj = KTextSurfaceWriter(text_rect) + fillcolor = (231,178,66,0) + textobj = KTextSurfaceWriter(text_rect, font, color, fillcolor) textobj.text = (text) - textobj.color = color - textobj.fillcolor = (231,178,66,0) textobj.invalidate() self._ktexts.append(textobj) diff --git a/usmpgames/ktextsurfacewriter.py b/usmpgames/ktextsurfacewriter.py index 4639528..3a7bd47 100755 --- a/usmpgames/ktextsurfacewriter.py +++ b/usmpgames/ktextsurfacewriter.py @@ -24,7 +24,7 @@ class KTextSurfaceWriter(object): self.font = pygame.font.Font(None, 30) else: self.font = font - #self.fillcolor = fillcolor + self.fillcolor = fillcolor self.color = color self._text = "KTextSurfaceWriter - version %s" % __version__ self._resultPage = [] |