home *** CD-ROM | disk | FTP | other *** search
/ Game Programming for Teens / GameProgrammingForTeens.iso / Source / chapter10 / demo10-07.bb < prev    next >
Encoding:
Text File  |  2003-04-06  |  463 b   |  22 lines

  1. ;demo10-07.bb - What if there is no mouse cursor?
  2. Graphics 640,480
  3. ;Set default drawing surface to back buffer
  4. SetBuffer BackBuffer()
  5.  
  6. ;MAIN LOOP
  7. While Not KeyDown(1)
  8.  
  9. ;Clear the Screen
  10. Cls
  11. ;Reset printing commands to top left hand corner
  12. Locate 0,0
  13. Print "Try guessing where the mouse actually is!"
  14.  
  15. ;Print X and Y coordinates
  16. Print "MouseX: " + MouseX()
  17. Print "MouseY: " + MouseY()
  18.  
  19. ;Flip front and back buffers
  20. Flip
  21.  
  22. Wend ;End of Main loop