setscreen ("nocursor")
var newx, newy, newb : int := 0
var font, x, y, btnNumber, btnUpDown, a, b : int
var text : string
font := Font.New ("serif:12")
Mouse.Where (newx, newy, newb)
loop
Mouse.ButtonWait ("down", x, y, btnNumber, btnUpDown)
newx := x
newy := y
loop
drawbox (113, 66, 640, 400, 7)
Draw.Box (115, 68, 638, 398, 7)
drawfill (114, 67, 1, 7)
Draw.Box (x, y, newx, newy, 0)
exit when Mouse.ButtonMoved ("up")
Mouse.Where (newx, newy, newb)
Draw.Box (x, y, newx, newy, 7) % Supposed tod raw a box...
locatexy (x, y)
get text % Draw line to position
end loop
Font.Draw (text, x, y, font, 7)
Mouse.ButtonWait ("up", newx, newy, btnNumber, btnUpDown)
Draw.Box (x, y, newx, newy, 0) % ...and erase the box.
end loop |