changeset 675:67373f9d2d20 pyntnclick

Renable cursor highlights. NAFC how it's working, but wth
author Stefano Rivera <stefano@rivera.za.net>
date Sun, 12 Feb 2012 19:01:53 +0200
parents 94d3552bb4eb
children 106efeae9745
files pyntnclick/cursor.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pyntnclick/cursor.py	Sun Feb 12 18:53:58 2012 +0200
+++ b/pyntnclick/cursor.py	Sun Feb 12 19:01:53 2012 +0200
@@ -44,7 +44,7 @@
 
     def set_highlight(self, enable):
         if enable != self.highlighted:
-            self.load()
+            # Do we need this? self.load()
             self.highlighted = enable
             self.image = self.plain_image.copy()
             if enable:
@@ -74,7 +74,7 @@
     def draw(self, surface):
         super(CursorScreen, self).draw(surface)
         self.set_cursor(self.game.tool)
-        #XXX: self.cursor.set_highlight(self.cursor_highlight())
+        self._loaded_cursor.set_highlight(self.cursor_highlight())
         self._cursor_group.update()
         self._cursor_group.draw(surface)
 
@@ -92,9 +92,10 @@
     def cursor_highlight(self):
         #XXX: if not Rect((0, 0), SCENE_SIZE).collidepoint(pygame.mouse.get_pos()):
         #XXX:     return False
-        if self.screen.game.highlight_override:
+        if self.game.highlight_override:
+            # TODO: What is this?
             return True
-        current_thing = self.screen.game.current_thing
+        current_thing = self.game.current_thing
         if current_thing:
             return current_thing.is_interactive()
         return False