X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/63fd81dc12159a8621cca5004558ae7dac2c9395..fa5bf40bfe796d33480a09d9e6400502552d66f7:/src/minwii/widgets/cursors.py?ds=sidebyside diff --git a/src/minwii/widgets/cursors.py b/src/minwii/widgets/cursors.py index f7940fd..4edc2dc 100755 --- a/src/minwii/widgets/cursors.py +++ b/src/minwii/widgets/cursors.py @@ -48,6 +48,7 @@ class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin): self.duration = duration self.image = self.images[0] + self.pressed = False # workarround cursor alignement problem pygame.event.set_blocked(pygame.MOUSEMOTION) pygame.mouse.set_pos(pygame.mouse.get_pos()) @@ -91,6 +92,7 @@ class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin): self.dirty = 1 self._blinking = False self.image = self.flashImage + self.pressed = True @event_handler(pygame.MOUSEBUTTONUP) def flashOff(self, event) : @@ -99,6 +101,7 @@ class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin): self._blinking = True else : self.image = self.images[0] + self.pressed = False @event_handler(pygame.MOUSEMOTION) def move(self, event) : @@ -129,4 +132,4 @@ class ForeverTimer(Thread) : time.sleep(self.duration) def stop(self) : - self.running = False \ No newline at end of file + self.running = False