drawoval.bmx 390 B

123456789101112131415161718
  1. ' drawoval.bmx
  2. ' draws a pair of eyes using 4 DrawOval commands, 2 white, 2 blue
  3. ' positions the blue ovals so the eyes track the mouse
  4. Graphics 640,480
  5. While Not KeyHit(KEY_ESCAPE)
  6. Cls
  7. SetColor 255,255,255
  8. DrawOval 0,0,320,200
  9. DrawOval 320,0,320,200
  10. SetColor 0,0,255
  11. x=(MouseX()-320)/10
  12. y=(MouseY()-240)/10
  13. DrawOval 220-32+x,100+y,64,40
  14. DrawOval 420-32+x,100+y,64,40
  15. Flip
  16. Wend