diff gamelib/widgets.py @ 313:40dd77f71e11

Computer typeface for JIM.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 28 Aug 2010 09:37:21 +0200
parents 3cedc4f95925
children 3476e8f3b100
line wrap: on
line diff
--- a/gamelib/widgets.py	Sat Aug 28 08:57:11 2010 +0200
+++ b/gamelib/widgets.py	Sat Aug 28 09:37:21 2010 +0200
@@ -58,10 +58,10 @@
 
     def __init__(self, screen, text, wrap_width, style=None, **kwds):
         CursorWidget.__init__(self, screen)
+        self.set_style(style)
         paras = text.split("\n\n")
         text = "\n".join([textwrap.fill(para, wrap_width) for para in paras])
         albow.controls.Label.__init__(self, text, **kwds)
-        self.set_style(style)
 
     def set_style(self, style):
         self.set_margin(5)
@@ -70,6 +70,7 @@
         self.bg_color = (127, 127, 127)
         self.fg_color = (0, 0, 0)
         if style == "JIM":
+            self.set(font=get_font(20, "chintzy.ttf"))
             self.bg_color = Color(255, 127, 127, 207)
             self.fg_color = (0, 0, 0)
             self.border_color = (127, 0, 0)