projects
/
minwii.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfix : sous Windows, l'attribut "rel" d'un événement MOUSEMOTION continue à croitre...
[minwii.git]
/
src
/
minwii
/
widgets
/
cursors.py
diff --git
a/src/minwii/widgets/cursors.py
b/src/minwii/widgets/cursors.py
index
fa1f673
..
f7940fd
100755
(executable)
--- a/
src/minwii/widgets/cursors.py
+++ b/
src/minwii/widgets/cursors.py
@@
-10,7
+10,7
@@
import pygame
import os
from threading import Thread
import time
import os
from threading import Thread
import time
-from eventutils import EventHandlerMixin, event_handler
+from
minwii.
eventutils import EventHandlerMixin, event_handler
from itertools import cycle
class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin):
from itertools import cycle
class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin):
@@
-103,7
+103,9
@@
class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin):
@event_handler(pygame.MOUSEMOTION)
def move(self, event) :
self.dirty = 1
@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
def setPosition(self, pos) :
self.dirty = 1