summaryrefslogtreecommitdiffstats
path: root/VisualNaCro/recorder.pl
diff options
context:
space:
mode:
authordscho <dscho>2006-09-12 15:53:58 +0000
committerdscho <dscho>2006-09-12 15:53:58 +0000
commita26dbfe3d013b5fc8d5f4be3677db1c372e22201 (patch)
treeca8052d252050ef20b809fdcb9a0e4655228c3c8 /VisualNaCro/recorder.pl
parent9b93f295e90b4d8560068bda8659617f4754a88f (diff)
downloadlibtdevnc-a26dbfe3d013b5fc8d5f4be3677db1c372e22201.tar.gz
libtdevnc-a26dbfe3d013b5fc8d5f4be3677db1c372e22201.zip
implement rubberband for rectangular selection
Diffstat (limited to 'VisualNaCro/recorder.pl')
-rw-r--r--VisualNaCro/recorder.pl11
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 {