diff options
author | dscho <dscho> | 2006-09-12 15:53:58 +0000 |
---|---|---|
committer | dscho <dscho> | 2006-09-12 15:53:58 +0000 |
commit | a26dbfe3d013b5fc8d5f4be3677db1c372e22201 (patch) | |
tree | ca8052d252050ef20b809fdcb9a0e4655228c3c8 /VisualNaCro/recorder.pl | |
parent | 9b93f295e90b4d8560068bda8659617f4754a88f (diff) | |
download | libvncserver-a26dbfe3d013b5fc8d5f4be3677db1c372e22201.zip libvncserver-a26dbfe3d013b5fc8d5f4be3677db1c372e22201.tar.gz |
implement rubberband for rectangular selection
Diffstat (limited to 'VisualNaCro/recorder.pl')
-rw-r--r-- | VisualNaCro/recorder.pl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/VisualNaCro/recorder.pl b/VisualNaCro/recorder.pl index 4f3c825..53dfbc2 100644 --- a/VisualNaCro/recorder.pl +++ b/VisualNaCro/recorder.pl @@ -117,7 +117,6 @@ while(1) { if($magickey>3 && !$keydown) { $magickey=0; $mode="menu"; - $dragging=0; nacro::alert($vnc,"VisualNaCro: press 'q' to quit\nor mark reference rectangle by dragging",10); } } else { @@ -169,13 +168,13 @@ while(1) { $x=nacro::getx($vnc); $y=nacro::gety($vnc); $buttons=nacro::getbuttons($vnc); - if(!$dragging && (($buttons&1)==1)) { - print STDERR "start draggin: $x $y\n"; + if(($buttons&1)==1) { + print STDERR "start draggin: $x $y\n"; $start_x=$x; $start_y=$y; - $dragging=1; - } elsif($dragging && (($buttons&1)==0)) { - print STDERR "stop draggin: $x $y\n"; + nacro::rubberband($vnc, $x, $y); + $x=nacro::getx($vnc); + $y=nacro::gety($vnc); if($start_x==$x && $start_y==$y) { print OUT "\$x_origin=0; \$y_origin=0;\n"; } else { |