Mercurial > pyntnclick
comparison gamelib/widgets.py @ 407:c7a6846262e3
Fix cursor handling after message dismissal.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sat, 28 Aug 2010 22:01:03 +0200 |
parents | 1555677d86f6 |
children | 05d15be39377 |
comparison
equal
deleted
inserted
replaced
406:90ae05f25793 | 407:c7a6846262e3 |
---|---|
8 import albow.controls | 8 import albow.controls |
9 import albow.menu | 9 import albow.menu |
10 from albow.resource import get_font, get_image | 10 from albow.resource import get_font, get_image |
11 from pygame.color import Color | 11 from pygame.color import Color |
12 from pygame.rect import Rect | 12 from pygame.rect import Rect |
13 from pygame import mouse | |
13 | 14 |
14 from constants import BUTTON_SIZE | 15 from constants import BUTTON_SIZE |
15 from cursor import CursorWidget | 16 from cursor import CursorWidget |
16 | 17 |
17 | 18 |
118 def _draw_all_no_bg(self, surface): | 119 def _draw_all_no_bg(self, surface): |
119 CursorWidget.draw_all(self, surface) | 120 CursorWidget.draw_all(self, surface) |
120 | 121 |
121 def mouse_down(self, event): | 122 def mouse_down(self, event): |
122 self.dismiss() | 123 self.dismiss() |
124 self.screen.state_widget._mouse_move(mouse.get_pos()) | |
125 for widget in self.screen.state_widget.subwidgets: | |
126 widget._mouse_move(mouse.get_pos()) | |
123 | 127 |
124 def cursor_highlight(self): | 128 def cursor_highlight(self): |
125 return False | 129 return False |
126 | 130 |
127 | 131 |