Mercurial > boomslang
comparison gamelib/state.py @ 135:b43599b7f8a2
Cursor highlights
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Tue, 24 Aug 2010 20:33:20 +0200 |
parents | 0530547a131f |
children | d264850806dc |
comparison
equal
deleted
inserted
replaced
134:faac82748f5a | 135:b43599b7f8a2 |
---|---|
492 def is_interactive(self): | 492 def is_interactive(self): |
493 return self.current_interact is not None | 493 return self.current_interact is not None |
494 | 494 |
495 def enter(self, item): | 495 def enter(self, item): |
496 """Called when the cursor enters the Thing.""" | 496 """Called when the cursor enters the Thing.""" |
497 pass | 497 self.state.screen.cursor_highlight(True) |
498 | 498 |
499 def leave(self): | 499 def leave(self): |
500 """Called when the cursr leaves the Thing.""" | 500 """Called when the cursr leaves the Thing.""" |
501 pass | 501 self.state.screen.cursor_highlight(False) |
502 | 502 |
503 def interact(self, item): | 503 def interact(self, item): |
504 if not self.is_interactive(): | 504 if not self.is_interactive(): |
505 return | 505 return |
506 if item is None: | 506 if item is None: |