1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
# mousetest.kbs - 2009-12-21 j.m.reneau
# click and doodle on the graphics output
cls
print "doodle on the graphic output with your mouse"
print "left button to draw in black"
print "right button to draw in crazy colors"
print "right and left button to erase"
clg
color white
rect 0,0,graphwidth, graphheight
loop:
if mouseb = 1 then gosub blackline
if mouseb = 2 then gosub randomline
if mouseb = 3 then gosub clearline
goto loop
blackline:
color black
circle mousex, mousey, 2
return
randomline:
color rand*256, rand*256, rand*256
circle mousex, mousey, 2
return
clearline:
color clear
circle mousex, mousey, 2
return
|