Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-11-21 02:50:29 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-11-21 02:50:29 (GMT)
commit8aad41077510f1b488a580b48cac038146fd389c (patch)
treec6af224cd45d6f20328fbe20eca86398d47a8285 /pysamples
parentf29d04be5f95dc179b6169c2e378ab9be9800986 (diff)
mapping to turtle coordinate space (#2502)
Diffstat (limited to 'pysamples')
-rw-r--r--pysamples/push_mouse_event.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pysamples/push_mouse_event.py b/pysamples/push_mouse_event.py
index a79f53e..485061f 100644
--- a/pysamples/push_mouse_event.py
+++ b/pysamples/push_mouse_event.py
@@ -32,8 +32,8 @@ def myblock(lc, x):
if lc.tw.mouse_flag == 1:
# push y first so x will be popped first
- lc.heap.append(lc.tw.mouse_y)
- lc.heap.append(lc.tw.mouse_x)
+ lc.heap.append((lc.tw.canvas.height / 2) - lc.tw.mouse_y)
+ lc.heap.append(lc.tw.mouse_x - (lc.tw.canvas.width / 2))
lc.heap.append(1) # mouse event
lc.tw.mouse_flag = 0
else: