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())
self.dirty = 1
self._blinking = False
self.image = self.flashImage
+ self.pressed = True
@event_handler(pygame.MOUSEBUTTONUP)
def flashOff(self, event) :
self._blinking = True
else :
self.image = self.images[0]
+ self.pressed = False
@event_handler(pygame.MOUSEMOTION)
def move(self, event) :
time.sleep(self.duration)
def stop(self) :
- self.running = False
\ No newline at end of file
+ self.running = False