# HG changeset patch # User Jeremy Thurgood # Date 1282629102 -7200 # Node ID 60770ca02c1af4be7cd5551b81740832e205aaa1 # Parent 397c5ff1528fb7707d0416a937b490155cae4dcd Fix message dialog mouse cursor freezing. diff -r 397c5ff1528f -r 60770ca02c1a gamelib/gamescreen.py --- a/gamelib/gamescreen.py Tue Aug 24 01:02:57 2010 +0200 +++ b/gamelib/gamescreen.py Tue Aug 24 07:51:42 2010 +0200 @@ -48,9 +48,10 @@ self.state.set_tool(None) -class MessageDialog(BoomLabel): +class MessageDialog(BoomLabel, CursorWidget): def __init__(self, text, wrap_width, **kwds): + CursorWidget.__init__(self) paras = text.split("\n\n") text = "\n".join([textwrap.fill(para, wrap_width) for para in paras]) Label.__init__(self, text, **kwds) @@ -60,6 +61,10 @@ self.bg_color = (127, 127, 127) self.fg_color = (0, 0, 0) + def draw(self, surface): + BoomLabel.draw(self, surface) + CursorWidget.draw(self, surface) + def mouse_down(self, event): self.dismiss()