File: mousedoodle.kbs

package info (click to toggle)
basic256 0.9.6.69a-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,304 kB
  • sloc: cpp: 7,778; yacc: 926; lex: 575; sh: 21; makefile: 7
file content (35 lines) | stat: -rw-r--r-- 628 bytes parent folder | download
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