summaryrefslogtreecommitdiffstats
path: root/library/demos/floor.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/demos/floor.tcl')
-rw-r--r--library/demos/floor.tcl15
1 files changed, 10 insertions, 5 deletions
diff --git a/library/demos/floor.tcl b/library/demos/floor.tcl
index d5ef3a0..37e1b95 100644
--- a/library/demos/floor.tcl
+++ b/library/demos/floor.tcl
@@ -1354,13 +1354,18 @@ floorDisplay $c 3
# Set up event bindings for canvas:
-$c bind floor1 <1> "floorDisplay $c 1"
-$c bind floor2 <1> "floorDisplay $c 2"
-$c bind floor3 <1> "floorDisplay $c 3"
+$c bind floor1 <Button-1> "floorDisplay $c 1"
+$c bind floor2 <Button-1> "floorDisplay $c 2"
+$c bind floor3 <Button-1> "floorDisplay $c 3"
$c bind room <Enter> "newRoom $c"
$c bind room <Leave> {set currentRoom ""}
-bind $c <2> "$c scan mark %x %y"
-bind $c <B2-Motion> "$c scan dragto %x %y"
+if {[tk windowingsystem] eq "aqua"} {
+ bind $c <Button-3> "$c scan mark %x %y"
+ bind $c <B3-Motion> "$c scan dragto %x %y"
+} else {
+ bind $c <Button-2> "$c scan mark %x %y"
+ bind $c <B2-Motion> "$c scan dragto %x %y"
+}
bind $c <Destroy> "unset currentRoom"
set currentRoom ""
trace variable currentRoom w "roomChanged $c"