'Future.Library Pageing and Mouse Support
'
DECLARE SUB DrawStuff ()

REM $INCLUDE: 'future.bi'

Set640x480 8 'Set 640x480 svga screen

DrawStuff  'draws stuff on the first 3 pages

Future.MouseOn 'turn on svga mouse

DO
P% = (P% + 1) MOD 3

        FOR i& = 0 TO 480& * 60& 'delay 1 sec.
         WAIT &H3DA, 1
         WAIT &H3DA, 1, 1
         Future.UpdateMouse 'update the mouse all the time
        NEXT

ViewPage P%              'change page
LOOP UNTIL LEN(INKEY$)

Future.MouseOff   'turn off svga mouse
ResetScreen     'set the screen back in text mode

SUB DrawStuff
SetPage 0
FOR i% = 0 TO 500
Future.LINE 640 * RND, 480 * RND, 640 * RND, 480 * RND, RND * 255&, -1
NEXT
Future.PRINT 0, 0, "Page: 0 of" + STR$(Pages%), 15, 0
SetPage 1
FOR i% = 0 TO 300
Future.CIRCLE 640 * RND, 480 * RND, RND * 640, RND * 255
NEXT
Future.PRINT 0, 0, "Page: 1 of" + STR$(Pages%), 15, 0
SetPage 2
FOR i% = 0 TO 300
Future.BOX 640 * RND, 480 * RND, 640 * RND, 480 * RND, RND * 255
NEXT
Future.PRINT 0, 0, "Page: 2 of" + STR$(Pages%), 15, 0
END SUB

