Would this work in a way like this?

(I would also like to know how to scale, could somone make a little demo?

draw=1;
xprev=xmouse;
yprev=ymouse;
erase(255,255,255,1);
if(draw==1){
setpen(0, 100, 255, 0, 1);
moveto(xmouse, ymouse);
lineto(xprev, ymouse);
lineto(xprev, yprev);
lineto(xmouse, yprev);
lineto(xmouse, ymouse);
}
if(draw==1){
CreateTimer("unit", "1", 100);
draw=0;
}
if(x<max(xprev, xmouse) && x>min(xprev, xmouse) && y<max(yprev, ymouse) && y>min(yprev, ymouse)){
selected=1;
}
Users browsing this forum: No registered users and 1 guest