Mercurial > boomslang
comparison pyntnclick/cursor.py @ 692:d6ded808cc33 pyntnclick
Much scene management refactoring.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Tue, 14 Feb 2012 13:39:05 +0200 |
parents | 6d75895477ac |
children | c8b683dd56d3 |
comparison
equal
deleted
inserted
replaced
691:60bf20849231 | 692:d6ded808cc33 |
---|---|
1 # cursor.py | 1 # cursor.py |
2 # Copyright Boomslang team, 2010 (see COPYING File) | 2 # Copyright Boomslang team, 2010 (see COPYING File) |
3 # Sprite Cursor | 3 # Sprite Cursor |
4 | 4 |
5 from pygame.sprite import Sprite, RenderUpdates | 5 from pygame.sprite import Sprite, RenderUpdates |
6 from pygame.rect import Rect | |
7 import pygame | 6 import pygame |
8 import pygame.color | 7 import pygame.color |
9 import pygame.cursors | 8 import pygame.cursors |
10 import pygame.mouse | 9 import pygame.mouse |
11 | 10 |
88 self._loaded_cursor.load(self.gd.resource) | 87 self._loaded_cursor.load(self.gd.resource) |
89 self._cursor_group.empty() | 88 self._cursor_group.empty() |
90 self._cursor_group.add(self._loaded_cursor) | 89 self._cursor_group.add(self._loaded_cursor) |
91 | 90 |
92 def cursor_highlight(self): | 91 def cursor_highlight(self): |
93 #XXX: if not Rect((0, 0), SCENE_SIZE).collidepoint(pygame.mouse.get_pos()): | 92 return self.container.mouseover_widget.highlight_cursor |
94 #XXX: return False | |
95 #XXX: if self.game.highlight_override: | |
96 #XXX: return True | |
97 current_thing = self.game.current_thing | |
98 if current_thing: | |
99 return current_thing.is_interactive() | |
100 return False |