/*By :viperfan7
made it in one day
the left mouse button is to draw, the right mouse button is to erase, and the middle/mouse wheel is to change the colour randomly
*/
View.Set ("graphics:max;max,offscreenonly")
Mouse.ButtonChoose ("multibutton")
var x, y, button, c : int
%procedure for painting
proc paint
c := Rand.Int (1, maxcolour)
colour (c)
put c
loop
Mouse.Where (x, y, button)
if button = 1 then
Draw.Dot (x, y, c)
drawdot (x + 1, y + 1, c)
drawdot (x - 1, y - 1, c)
drawdot (x + 1, y - 1, c)
drawdot (x - 1, y + 1, c)
drawdot (x, y + 1, c)
drawdot (x, y - 1, c)
drawdot (x + 1, y, c)
drawdot (x - 1, y, c)
elsif button = 100 then
Draw.Dot (x, y, 0)
drawdot (x + 1, y + 1, 0)
drawdot (x - 1, y - 1, 0)
drawdot (x + 1, y - 1, 0)
drawdot (x - 1, y + 1, 0)
drawdot (x, y + 1, 0)
drawdot (x, y - 1, 0)
drawdot (x + 1, y, 0)
drawdot (x - 1, y, 0)
elsif button = 10 then
delay (500)
c := Rand.Int (1, maxcolour)
drawfillbox (0, maxy - 20, 50, maxy, 0)
locate (1, 1)
colour (c)
put c ..
end if
View.Update
end loop
end paint
%main program, short I know :P
paint
|