X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/blobdiff_plain/d3b1dcc8991d9b0110133abe6eeb43f69848a78d..63fd81dc12159a8621cca5004558ae7dac2c9395:/src/minwii/widgets/cursors.py diff --git a/src/minwii/widgets/cursors.py b/src/minwii/widgets/cursors.py index ad8f383..f7940fd 100755 --- a/src/minwii/widgets/cursors.py +++ b/src/minwii/widgets/cursors.py @@ -103,7 +103,9 @@ class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin): @event_handler(pygame.MOUSEMOTION) def move(self, event) : self.dirty = 1 - self.rect.move_ip(event.rel) + x, y = pygame.mouse.get_pos() + rel = (x - self.rect.centerx, y - self.rect.centery) + self.rect.move_ip(rel) def setPosition(self, pos) : self.dirty = 1