comparison gamelib/cursor.py @ 108:ab11689aec36

Cursor uses draw_over() rather than draw().
author Jeremy Thurgood <firxen@gmail.com>
date Tue, 24 Aug 2010 14:17:09 +0200
parents da547e148532
children 13d8cb1d5962
comparison
equal deleted inserted replaced
107:5213b45fcc7e 108:ab11689aec36
26 def __init__(self, *args, **kwargs): 26 def __init__(self, *args, **kwargs):
27 Widget.__init__(self, *args, **kwargs) 27 Widget.__init__(self, *args, **kwargs)
28 self._cursor_group = RenderUpdates() 28 self._cursor_group = RenderUpdates()
29 self._cursor_name = '' 29 self._cursor_name = ''
30 30
31 def draw(self, _surface): 31 def draw_over(self, _surface):
32 Widget.draw_over(self, _surface)
32 surface = self.get_root().surface 33 surface = self.get_root().surface
33 if self.rect.collidepoint(mouse.get_pos()): 34 if self.rect.collidepoint(mouse.get_pos()):
34 cursor = self.get_sprite_cursor() 35 cursor = self.get_sprite_cursor()
35 if cursor != self._cursor_name: 36 if cursor != self._cursor_name:
36 if self.get_sprite_cursor() is None: 37 if self.get_sprite_cursor() is None: