Mercurial > boomslang
comparison gamelib/widgets.py @ 187:fbfd8e748ac0
Remove screen reference from State.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Wed, 25 Aug 2010 16:45:06 +0200 |
parents | 97322b78d1c1 |
children | eb101b6fb3dd |
comparison
equal
deleted
inserted
replaced
186:f15c4f7c24e6 | 187:fbfd8e748ac0 |
---|---|
21 self.size = (w + 2 * d, h + 2 * d) | 21 self.size = (w + 2 * d, h + 2 * d) |
22 | 22 |
23 | 23 |
24 class MessageDialog(BoomLabel, CursorWidget): | 24 class MessageDialog(BoomLabel, CursorWidget): |
25 | 25 |
26 def __init__(self, text, wrap_width, **kwds): | 26 def __init__(self, screen, text, wrap_width, **kwds): |
27 CursorWidget.__init__(self) | 27 CursorWidget.__init__(self, screen) |
28 paras = text.split("\n\n") | 28 paras = text.split("\n\n") |
29 text = "\n".join([textwrap.fill(para, wrap_width) for para in paras]) | 29 text = "\n".join([textwrap.fill(para, wrap_width) for para in paras]) |
30 albow.controls.Label.__init__(self, text, **kwds) | 30 albow.controls.Label.__init__(self, text, **kwds) |
31 self.set_margin(5) | 31 self.set_margin(5) |
32 self.border_width = 1 | 32 self.border_width = 1 |