# HG changeset patch # User Jeremy Thurgood # Date 1282652229 -7200 # Node ID ab11689aec3625bcba7f03d562c7ed3434c3850b # Parent 5213b45fcc7e7db4d91d8af8501c1719a5827dcf Cursor uses draw_over() rather than draw(). diff -r 5213b45fcc7e -r ab11689aec36 gamelib/cursor.py --- a/gamelib/cursor.py Tue Aug 24 14:07:07 2010 +0200 +++ b/gamelib/cursor.py Tue Aug 24 14:17:09 2010 +0200 @@ -28,7 +28,8 @@ self._cursor_group = RenderUpdates() self._cursor_name = '' - def draw(self, _surface): + def draw_over(self, _surface): + Widget.draw_over(self, _surface) surface = self.get_root().surface if self.rect.collidepoint(mouse.get_pos()): cursor = self.get_sprite_cursor() diff -r 5213b45fcc7e -r ab11689aec36 gamelib/gamescreen.py --- a/gamelib/gamescreen.py Tue Aug 24 14:07:07 2010 +0200 +++ b/gamelib/gamescreen.py Tue Aug 24 14:17:09 2010 +0200 @@ -38,9 +38,9 @@ item_image = self.state.inventory[item_no].get_inventory_image() surface.blit(item_image, rect, None, BLEND_ADD) - def draw(self, surface): - PaletteView.draw(self, surface) - CursorWidget.draw(self, surface) + def draw_over(self, surface): + PaletteView.draw_over(self, surface) + CursorWidget.draw_over(self, surface) def click_item(self, item_no, event): self.state.set_tool(self.state.inventory[item_no]) @@ -66,9 +66,8 @@ 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 draw_over(self, surface): + CursorWidget.draw_over(self, surface) def mouse_down(self, event): self.dismiss() @@ -82,7 +81,6 @@ def draw(self, surface): self.state.draw(surface) - CursorWidget.draw(self, surface) def mouse_down(self, event): result = self.state.interact(event.pos) @@ -108,7 +106,7 @@ class DetailWindow(CursorWidget): def __init__(self, state): - Widget.__init__(self, Rect(0, 0, SCENE_SIZE[0], SCENE_SIZE[1])) + CursorWidget.__init__(self, Rect(0, 0, SCENE_SIZE[0], SCENE_SIZE[1])) self.state = state self.draw_area = Rect(0, 0, 300, 300) self.draw_area.center = self.center