Mercurial > boomslang
diff gamelib/state.py @ 139:a5972444ad1e
Improve cursor state handling, disable highlights on modal dialogs
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Tue, 24 Aug 2010 22:02:22 +0200 |
parents | 17411b984dc2 |
children | 5e5d71e40e54 |
line wrap: on
line diff
--- a/gamelib/state.py Tue Aug 24 21:52:45 2010 +0200 +++ b/gamelib/state.py Tue Aug 24 22:02:22 2010 +0200 @@ -305,6 +305,7 @@ """ if self._current_thing is not None: if self._current_thing.contains(pos): + self.state.screen.cursor_highlight(True) return else: self._current_thing.leave() @@ -317,6 +318,7 @@ self._current_description = self._make_description( thing.get_description()) break + self.state.screen.cursor_highlight(self._current_thing is not None) def get_detail_size(self): return self._background.get_size() @@ -495,11 +497,11 @@ def enter(self, item): """Called when the cursor enters the Thing.""" - self.state.screen.cursor_highlight(True) + pass def leave(self): """Called when the cursr leaves the Thing.""" - self.state.screen.cursor_highlight(False) + pass def interact(self, item): if not self.is_interactive():