changeset 266:80cb577e38f2

Non-interactive things no longer highlight the cursor.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 27 Aug 2010 20:08:18 +0200
parents 88a77875878e
children 024e8ab4b785
files gamelib/scenes/scene_widgets.py gamelib/state.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/scenes/scene_widgets.py	Fri Aug 27 20:06:44 2010 +0200
+++ b/gamelib/scenes/scene_widgets.py	Fri Aug 27 20:08:18 2010 +0200
@@ -135,6 +135,9 @@
     def get_description(self):
         return self.description
 
+    def is_interactive(self):
+        return False
+
 
 class Door(Thing):
     """A door somewhere"""
--- a/gamelib/state.py	Fri Aug 27 20:06:44 2010 +0200
+++ b/gamelib/state.py	Fri Aug 27 20:08:18 2010 +0200
@@ -323,7 +323,7 @@
         """
         if self._current_thing is not None:
             if self._current_thing.contains(pos):
-                screen.cursor_highlight(True)
+                screen.cursor_highlight(self._current_thing.is_interactive())
                 return
             else:
                 self._current_thing.leave()
@@ -408,7 +408,7 @@
         return None
 
     def is_interactive(self):
-        return self.current_interact is not None
+        return True
 
     def enter(self, item):
         """Called when the cursor enters the Thing."""