projects
/
minwii.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
restitution des mouvements du curseur.
[minwii.git]
/
src
/
app
/
widgets
/
cursors.py
diff --git
a/src/app/widgets/cursors.py
b/src/app/widgets/cursors.py
index
fc05b56
..
1e3fc4e
100755
(executable)
--- a/
src/app/widgets/cursors.py
+++ b/
src/app/widgets/cursors.py
@@
-99,3
+99,9
@@
class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin):
def move(self, event) :
self.dirty = 1
self.rect.move_ip(event.rel)
def move(self, event) :
self.dirty = 1
self.rect.move_ip(event.rel)
+
+ def setPosition(self, pos) :
+ self.dirty = 1
+ x, y = pos
+ rx, ry = self.rect.centerx, self.rect.centery
+ self.rect.move_ip(x-rx, y-ry)