Hey Iceman,
I'm not sure if this is exactly what you are looking for, but I think you can easily adapt it to fit your needs if not. What it does is allow you to move the mouse wherever you want, click and hold the LMB and a line is drawn from the starting point to where the mouse is currently positioned. An image is grabbed of the line and it is stored on a separate bitmap. The separate bitmap is copied to the screen. This way, you can dynamically draw to the screen and let go of the LMB when you have it where you want. Spacebar exits.
sync on : sync rate 0
set display mode desktop width(),desktop height(),screen depth()
backdrop off
create bitmap 1,desktop width(),desktop height()
create bitmap 2,desktop width(),desktop height()
set current bitmap 0
Drawing = 0
repeat
mx = mousex() : my = mousey() : mc = mouseclick()
if drawing = 0 and mc = 1
StartX = mx : StartY = my : drawing = 1
endif
if drawing = 1 and mx <> StartX and my <> StartY
set current bitmap 1
cls
line startx,starty,mx,my
x1 = startx : x2 = mx
if mx < startX then x1 = mx : x2 = StartX
y1 = StartY : y2 = my
if my < StartY then y1 = my : y2 = StartY
if image exist(999) = 1 then delete image 999
if sprite exist(1) = 1 then delete sprite 1
get image 999,x1,y1,x2,y2
copy bitmap 2,0
set current bitmap 0
sprite 1,x1,y1,999
if mc = 0
drawing = 0
set current bitmap 2
sprite 1,x1,y1,999
paste sprite 1,x1,y1
delete sprite 1
copy bitmap 2,0
set current bitmap 0
endif
endif
sync
until spacekey() = 1
end
LB
So many games to code.......so little time.