var x, y, button : int
var size : int := 5
var col : int := 7
process menu
loop
drawbox (0, 280, 120, 310, 7)
locate (11, 6)
put "Clear"
drawbox (0, 310, 120, 340, 7)
locate (8, 2)
put "Sizes (above) "
drawbox (0, 0, maxx, maxy, 7)
drawbox (0, 0, 120, maxy, 7)
drawfillbox (1, 0, 119, 20, 7) %Black
drawfillbox (1, 20, 119, 40, 15) %Dark Grey
drawfillbox (1, 40, 119, 60, 8) %Grey
drawfillbox (1, 60, 119, 80, 0) %White
drawfillbox (1, 80, 119, 100, 1) %Blue
drawfillbox (1, 100, 119, 120, 2) %Green
drawfillbox (1, 120, 119, 140, 4) %Red
drawfillbox (1, 140, 119, 160, 5) %purple
drawfillbox (1, 160, 119, 180, 9) %light Blue
drawfillbox (1, 180, 119, 200, 10) %light Green
drawfillbox (1, 200, 119, 220, 12) %light Red
drawfillbox (1, 220, 119, 240, 35) %light Purple
drawfillbox (1, 240, 119, 260, 14) %Yellow
drawfillbox (1, 260, 119, 280, 13) %Pink
drawfilloval (5, maxy - 55, 2, 2, 7)
drawfilloval (25, maxy - 55, 5, 5, 7)
drawfilloval (50, maxy - 55, 10, 10, 7)
drawfilloval (90, maxy - 55, 20, 20, 7)
loop
drawfillbox (0, maxy - 30, 120, maxy, col)
Mouse.Where (x, y, button)
if x > 0 and x < 120 and y < 20 and y > 0 and button = 1 then
col := 7
end if
if x > 0 and x < 120 and y < 40 and y > 20 and
button = 1 then
col := 15
end if
if x > 0 and x < 120 and y < 60 and y > 40 and
button = 1 then
col := 8
end if
if x > 0 and x < 120 and y < 80 and y > 60 and
button = 1 then
col := 0
end if
if x > 0 and x < 120 and y < 100 and y > 80 and
button = 1 then
col := 1
end if
if x > 0 and x < 120 and y < 120 and y > 100 and
button = 1 then
col := 2
end if
if x > 0 and x < 120 and y < 140 and y > 120 and
button = 1 then
col := 4
end if
if x > 0 and x < 120 and y < 160 and y > 140 and
button = 1 then
col := 5
end if
if x > 0 and x < 120 and y < 180 and y > 160 and
button = 1 then
col := 9
end if
if x > 0 and x < 120 and y < 200 and y > 180 and
button = 1 then
col := 10
end if
if x > 0 and x < 120 and y < 220 and y > 200 and
button = 1 then
col := 12
end if
if x > 0 and x < 120 and y < 240 and y > 220 and
button = 1 then
col := 35
end if
if x > 0 and x < 120 and y < 260 and y > 240 and
button = 1 then
col := 14
end if
if x > 0 and x < 120 and y < 280 and y > 260 and
button = 1 then
col := 13
end if
if x > 0 and x < 120 and y < 310 and y > 280 and
button = 1 then
delay (100)
cls
end if
if x > 0 and x < 120 and y < 340 and y > 310 and
button = 1 then
end if
if x < 7 and x > 3 and y < maxy - 53 and y > maxy - 57 and
button = 1 then
size := 2
end if
if x < 30 and x > 20 and y < maxy - 50 and y > maxy - 60 and
button = 1 then
size := 5
end if
if x < 60 and x > 40 and y < maxy - 45 and y > maxy - 65 and
button = 1 then
size := 10
end if
if x < 110 and x > 70 and y < maxy - 35 and y > maxy - 75 and
button = 1 then
size := 20
end if
exit when x < 120
end loop
end loop
end menu
process draw
delay (100)
loop
if x > 120 + size and y > 0 and x < maxx and y < maxy then
if button = 1 then
drawfilloval (x, y, size, size, col)
end if
end if
end loop
end draw
setscreen ("nocursor, noecho")
setscreen ("graphics : 900 ; 420")
fork menu
fork draw
|