View.Set ("graphics:600;400,position:top;left,offscreenonly")
var x, y, x1, y1, btnNumber, btnUpDown, buttons : int
function roundto (roundnum, roundinput : int) : int
result roundinput div roundnum * roundnum
end roundto
colourback (7)
cls
drawfillbox (0, 0, 100, 100, 4)
drawfillbox (0, 200, 100, 300, 4)
drawfillbox (0, 400, 100, 500, 4)
drawfillbox (100, 100, 200, 200, 4)
drawfillbox (300, 100, 400, 200, 4)
drawfillbox (100, 300, 200, 400, 4)
drawfillbox (200, 0, 300, 100, 4)
drawfillbox (400, 0, 500, 100, 4)
drawfillbox (300, 100, 400, 200, 4)
drawfillbox (300, 300, 400, 400, 4)
drawfillbox (200, 200, 300, 300, 4)
drawfillbox (400, 200, 500, 300, 4)
drawfillbox (500, 100, 600, 200, 4)
drawfillbox (500, 300, 600, 400, 4)
var pic : int
pic := Pic.New (0, 0, maxx, maxy)
Pic.Draw (pic, 0, 0, picCopy)
var z, w : int := 30
x := 50
y := 50
drawfilloval (x, y, z, w, 8)
loop
Mouse.ButtonWait ("down", x1, y1, btnNumber, btnUpDown)
if x >= x1 - 25 and x <= x1 + 25 and y >= y1 - 25 and y <= y1 + 25 then
loop
drawfilloval (x1, y1, z, w, 8)
Pic.Draw (pic, 0, 0, picCopy)
exit when Mouse.ButtonMoved ("up")
Mouse.Where (x1, y1, buttons)
drawfilloval (x1, y1, z, w, 3)
View.Update
end loop
Mouse.ButtonWait ("up", x1, y1, btnNumber, btnUpDown)
x1 := roundto (100, x1) + 50
y1 := roundto (100, y1) + 50
if whatdotcolour (x1,y1) not = 4 then
x1+=100
end if
drawfilloval (x1, y1, z, w, 8)
x := x1
y := y1
end if
View.Update
end loop
|