Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples/push_mouse_event.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-03-21 19:53:04 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-03-21 19:53:04 (GMT)
commitfc4b6a64cc06bb35328835a382c14a8af542d20c (patch)
treef9bf8fcab89ab16489de05142d06d482b6df6bea /pysamples/push_mouse_event.py
parent1eede14372ceaaec094c55ca01f4c8f6dbfd0ab4 (diff)
FLAG DAY: passing TurtleWindow instead of LogoCode instance as 1st argument
Diffstat (limited to 'pysamples/push_mouse_event.py')
-rw-r--r--pysamples/push_mouse_event.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pysamples/push_mouse_event.py b/pysamples/push_mouse_event.py
index 6966310..26301ac 100644
--- a/pysamples/push_mouse_event.py
+++ b/pysamples/push_mouse_event.py
@@ -23,7 +23,7 @@
# palette is selected.
-def myblock(lc, x): # ignore second argument
+def myblock(tw, x): # ignore second argument
###########################################################################
#
@@ -31,11 +31,11 @@ def myblock(lc, x): # ignore second argument
#
###########################################################################
- if lc.tw.mouse_flag == 1:
+ if tw.mouse_flag == 1:
# push y first so x will be popped first
- 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
+ tw.lc.heap.append((tw.canvas.height / 2) - tw.mouse_y)
+ tw.lc.heap.append(tw.mouse_x - (tw.canvas.width / 2))
+ tw.lc.heap.append(1) # mouse event
+ tw.mouse_flag = 0
else:
- lc.heap.append(0) # no mouse event
+ tw.lc.heap.append(0) # no mouse event