home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
progm
/
pbwindow.zip
/
PWDEMO.BAS
< prev
next >
Wrap
BASIC Source File
|
1990-09-10
|
44KB
|
1,522 lines
$COMPILE EXE
$DYNAMIC
$ERROR ALL OFF
$LIB ALL OFF
$OPTION CNTLBREAK OFF
$STACK 5000
$IF 0
PowerBASIC Windows Demo
PBWindows
Copr. 1990 Barry Erick
$ENDIF
PowerBasicWindows: 'a label for an external debugger
version$ ="Version 2.10"
copyright$="Copyright 1990 Barry Erick"
Member$ = " Member ASP "
copyright1$="Certain portions Copyright 1990 Robert S. Zale"
$IF 0
To Compile, use PBC as:
PBC PWdemo -CE
If you do not declare Max.Window% BEFORE you Include
PBWindow to any value >5, it will default to 5 in the file.
In this demo 14 are used, as we show 12
windows and 2 are used in the menuing at that time.
Special instructions for using PBWindows.PBU :
Place PbWindow.Pbu in your PBUD directory or default directory
Place PbWindow.Inc in your INC directory or default directory
Place, in your program, the next six non-rem lines, or, at least the
Max.Window% and AutoBuildTime% assignments and the $INCLUDE statement.
PBWindows may have all library functions off and compiler errors off.
It may be benificial to turn Interpreted Print ON.
Demo version... The full version also comes with an additional program
that allows partial windows to save memory. If you don't scroll, zoom
or use menus, smaller models can be used. This can be done in any
combination of the above. The demo only adds constants necessary, and
is fully functionable and not crippled in any way.
$ENDIF
DEFINT a - z'Best to do.
PUBLIC AutoFudge%'for this main unit.. make it global
PUBLIC KeyHit$
' The next few assignments are necessary, except as noted
%PBWSmall = 0 'necessary constant
%PBWScr = 1 'only necessary if %PBWSmall is True, here for
%PBWMen = 1 ' compatibility with the smaller registered version
%PBWZo = 1
%False = 0 'in unit and include, so not necessary here
%True = NOT %False 'ditto
Max.Window% = 14 'defaults to a 5 if not included here
AutoBuildTime% = 30 'necessary
AutoFudge% = 15 'not necessary for pbw, but needed for the demo
p = INSTR(COMMAND$,"/")
IF p > 0 THEN
p = VAL(MID$(COMMAND$,p+1))'allows a command line switch (/amount)
IF P > 10 AND P < 15000 THEN
AutoBuildTime% = P' to control the AutoBuildTime
AutoFudge% = P
END IF
END IF
ModifiedAutoBuildTime% = AutoBuildTime%
ModifiedAutoFudge% = AutoFudge%
'Load the include that also links the unit
$INCLUDE "PBWindow.inc" 'always necessary
$LINK "DayDate.Pbu" 'for the demo only
$LINK "Cpu.OBJ" 'also for the demo only
DECLARE FUNCTION WhatCpu%()
$IF 0
Following publics are for the DAYDATE.PBU file.
DayDate.PBU is not needed for pbWindows, but is here to support the
demo. CALL DATE
When DATE is called, the current DOS date is used to return the
current Day$, Month$,Year$, and Weekday$
$ENDIF
PUBLIC Day$,Month$,Year$,Weekday$
' The following variable defaults to %False, but is best to include here
UnderDevelopment% = %False
%black = 0'\
%blue = 1' \
%green = 2' \
%cyan = 3' \
%red = 4' \
%magenta = 5' \
%brown = 6' \
%white = 7' \______ Define Colors
%gray = 8' /
%ltblue = 9' /
%ltgreen = 10' /
%ltcyan = 11' /
%ltred = 12' /
%ltmagenta = 13' /
%yellow = 14' /
%brightwhite = 15' /
%blink = 16'/
%AutoTime = 3' For the autorun demo
' Now save the users screen parameters for later use
IF CSRLIN >1 THEN
userattributes% = SCREEN(CSRLIN-1,1,1)
ELSE
userattributes% = SCREEN(1,1,1)
END IF
$SEGMENT
'[******************]
SUB Minorpause(numtokill%,Char$)
LOCAL a$,x%, a!, b!
A! = TIMER
DO
B! = TIMER
IF INSTAT THEN
a$=INKEY$
KeyHit$ = A$
IF Char$ = CHR$(255) THEN EXIT LOOP
IF a$ = Char$ THEN EXIT LOOP
END IF
LOOP UNTIL b! => A! + %AutoTime +AutoFudge%
FOR x% = 1 TO numtokill%'12
CALL Removebox
NEXT
END SUB
'[******************]
SUB Pause(numtokill%)
SHARED wpt%
LOCAL a$,x%, a!, b!
CALL MakeBox(22,51,3,28,%black,%white,2,0,0,-1,-1)
CALL Ctrallbox(1,2,"Press spacebar to continue")
DO
a$=INKEY$
LOOP UNTIL a$=""
a! = TIMER
DO
B! = TIMER
IF INSTAT THEN
a$=INKEY$
IF a$=" " THEN EXIT LOOP
END IF
LOOP UNTIL B! => A! + %AutoTime + AutoFudge%
FOR x% = 1 TO numtokill%+1'plus one , because this is a window
CALL Removebox
NEXT
END SUB
'[******************]
SUB Screen1(finished%)'main title
SHARED wpt%,About
LOCAL x%,y%
CALL MakeBox(4,17,6,47,%black,%white,1,0,0,-1,-1)
CALL BoxTitle(6,"Ver 2.10",-1,-1)
IF finished% THEN
CALL Ctrbox(1,"Thanks for Viewing")
END IF
CALL Ctrbox(2,"Windows for")
CALL Ctrbox(3,"PowerBASIC")
IF finished% THEN
CALL CtrBox(4,"-Power and Speed-")
END IF
CALL MakeBox(13,15,4,55,%white,%black,0,0,0,-1,-1)
CALL Ctrbox(1,"Copyright 1990 Barry Erick")
CALL Ctrbox(2,"PowerBASIC Copyright 1990 Robert S. Zale")
IF Finished% AND IsColr% THEN
DECR wpt%
FOR y% = 7 TO 0 STEP -1
FOR x% = 0 TO 15
CALL Recolor(x%,y%,-1,-1)
' it happens so fast that we have to delay
DELAY .05
NEXT
NEXT
INCR wpt%
ELSEIF About THEN
CALL Pause(1)
ELSE
DELAY 3
END IF
FOR x% = 1 TO 2
CALL Removebox
NEXT
END SUB
'[******************]
SUB Screen2'scroll
LOCAL x%,cf,cb,cbf,cbb
IF NOT IsColr% THEN
cf = %White
cbb = %white
ELSE
cf = %Green
cbb = %red
END IF
CALL MakeBox(11,25,5,34,cf,%black,0,0,0,-1,-1)
CALL CtrBox(1,"PowerBASIC - The Fast Compiler")
CALL Ctrbox(2," ")
CALL Ctrbox(3,"Windows")
CALL Pause(1)
CALL MakeBox(4,17,9,46,cf,%black,3,0,0,cbb,%black)
CALL Prtbox(1,2,"▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ")
CALL Prtbox(2,2,"▒ ▒ ▒ ▒▒ ▒ ▒ ▒ ▒▒ ▒▒ ▒ ▒ ▒ ▒ ")
CALL Prtbox(3,2,"▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▒ ")
CALL Prtbox(4,2,"▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▒▒ ")
CALL Prtbox(5,2,"▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▒")
CALL Prtbox(6,2,"▒▒ ▒▒ ▒ ▒ ▒▒ ▒ ▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒ ▒")
CALL Prtbox(7,2,"▒▒ ▒▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒ ▒▒ ▒▒ ▒▒▒▒ ")
DELAY 1.25
FOR x% = 1 TO 5
CALL Boxscroll(0,-1,-1)
DELAY .03
NEXT
CALL Ctrbox(7,"Scrolling")
CALL Boxscroll(0,-1,-1)
DELAY .051
CALL Ctrbox(7,"Windows")
CALL Boxscroll(0,-1,-1)
DELAY .051
CALL Ctrbox(7,"Using")
CALL Boxscroll(0,-1,-1)
DELAY .051
CALL Ctrbox(7," PowerBASIC")
CALL Boxscroll(0,-1,-1)
DELAY .051
CALL BoxScroll(0,-1,-1)
DELAY 1.21
CALL Boxscroll(1,-1,-1)
CALL Prtbox(1,2,"██ ██ ███ █ █ ████ ███ ██ ██ ████ ")
DELAY .051
CALL Boxscroll(1,-1,-1)
CALL Prtbox(1,2,"██ ██ █ █ ██ █ █ ██ ██ ██ ██ █ █")
DELAY .051
CALL Boxscroll(1,-1,-1)
CALL Prtbox(1,2,"█ █ █ █ █ █ █ █ █ █ █ █ █ █ ██")
DELAY .051
CALL Boxscroll(1,-1,-1)
CALL Prtbox(1,2,"█ █ █ █ █ █ █ █ █ █ █ █ █ █ ███")
DELAY .051
CALL Boxscroll(1,-1,-1)
CALL Prtbox(1,2,"█ █ █ █ █ █ █ █ █ █ █ █ ██")
DELAY .051
CALL Boxscroll(1,-1,-1)
CALL Prtbox(1,2,"█ █ █ ██ █ █ █ ██ ██ █ █ █ █")
DELAY .051
CALL Boxscroll(1,-1,-1)
CALL Prtbox(1,2,"█ █ ███ █ █ ████ ███ █ █ ████ ")
DELAY .5
CALL Pause(1)
END SUB
'[******************]
SUB Screen3'windows
SHARED num$(),Zoom
LOCAL apart%,x%
apart% = 5
FOR x% = 1 TO 12
IF x% >6 THEN rw% = 15 ELSE rw% = 5
IF x% = 7 THEN
apart% = 5
IF Zoom THEN
IF IsColr% THEN
CALL ZoomBox(rw%,apart%,6,10,x% MOD 8,2,0,0,x% MOD 2,-1,-1)
ELSE
CALL ZoomBox(rw%,apart%,6,10,7,0,2,0,x% MOD 2,7,0)
END IF
ELSE
IF IsColr% THEN
CALL MakeBox(rw%,apart%,6,10,x% MOD 8,2,0,0,x% MOD 2,-1,-1)
ELSE
CALL MakeBox(rw%,apart%,6,10,7,0,2,0,x% MOD 2,7,0)
END IF
END IF
ELSE
IF Zoom THEN
IF IsColr% THEN
CALL ZoomBox(rw%,apart%,6,10,x% MOD 8,7-(x% MOD 8),_
0,0,x% MOD 2,-1,-1)
ELSE
CALL ZoomBox(rw%,apart%,6,10,7,0,2,0,x% MOD 2,-1,-1)
END IF
ELSE
IF IsColr% THEN
CALL MakeBox(rw%,apart%,6,10,x% MOD 8,7-(x% MOD 8),_
0,0,x% MOD 2,-1,-1)
ELSE
CALL MakeBox(rw%,apart%,6,10,7,0,2,0,x% MOD 2,-1,-1)
END IF
END IF
END IF
CALL Ctrbox(2,"Window")
CALL Ctrbox(3,num$(x%))
IF x% = 9 THEN
IF IsColr% THEN
CALL Boxtitle(2,"Press",16,-1)
ELSE
CALL BoxTitle(2,"Press",31,0)
END IF
END IF
IF x% = 10 THEN
IF IsColr% THEN
CALL Boxtitle(2,"Spacebar",16,-1)
ELSE
CALL BoxTitle(2,"Spacebar",31,0)
END IF
END IF
INCR apart% , 12
NEXT
CALL Minorpause(12," ")
END SUB
'[******************]
SUB Screen4'frames
SHARED Zoom
IF Zoom THEN
IF IsColr% THEN
CALL ZoomBox(10,25,5,30,%green,%black,0,0,0,-1,-1)
ELSE
CALL ZoomBox(10,25,5,30,7,0,0,0,0,-1,-1)
END IF
ELSE
IF IsColr% THEN
CALL MakeBox(10,25,5,30,%green,%black,0,0,0,-1,-1)
ELSE
CALL MakeBox(10,25,5,30,7,0,0,0,0,-1,-1)
END IF
END IF
CALL Ctrbox(2,"There are 10 Frames available:")
END SUB
'[******************]
SUB Pointers'for frames
CALL Ctrbox(1,CHR$(24))
CALL Prtbox(3,1,CHR$(27))
CALL Prtbox(3,20,CHR$(26))
CALL Ctrbox(5,CHR$(25))
END SUB
'[******************]
SUB Screen5'more frames
SHARED num$(),Zoom
LOCAL bfcc,brcc
IF Zoom THEN
IF IsColr% THEN
CALL ZoomBox(3,3,7,22,%red,%white,0,0,0,-1,-1)
ELSE
CALL ZoomBox(3,3,7,22,0,7,0,0,0,-1,-1)
END IF
ELSE
IF IsColr% THEN
CALL MakeBox(3,3,7,22,%red,%white,0,0,0,-1,-1)
ELSE
CALL MakeBox(3,3,7,22,0,7,0,0,0,-1,-1)
END IF
END IF
CALL Pointers
CALL Ctrbox(2,"Window")
CALL Ctrbox(3,"with")
CALL Ctrbox(4,"No Frame")
IF Zoom THEN
IF IsColr% THEN
CALL ZoomBox(3,55,7,22,%brown,%blue,1,0,0,-1,-1)
ELSE
CALL ZoomBox(3,55,7,22,0,7,1,0,0,-1,-1)
END IF
ELSE
IF IsColr% THEN
CALL MakeBox(3,55,7,22,%brown,%blue,1,0,0,-1,-1)
ELSE
CALL MakeBox(3,55,7,22,0,7,1,0,0,-1,-1)
END IF
END IF
CALL Pointers
CALL Ctrbox(3,"Single")
IF Zoom THEN
CALL ZoomBox(17,3,7,22,%black,%white,2,0,0,-1,-1)
ELSE
CALL MakeBox(17,3,7,22,%black,%white,2,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(3,"Double")
IF IsColr% THEN
frcc = %red
bfcc = %cyan
ELSE
frcc = %black
bfcc = %White
END IF
IF Zoom THEN
CALL ZoomBox(17,55,7,22,frcc,%white,3,0,0,-1,-1)
ELSE
CALL MakeBox(17,55,7,22,frcc,%white,3,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(2,"Single Horizontal")
CALL Ctrbox(4,"Double Vertical")
IF Zoom THEN
CALL ZoomBox(17,29,7,22,%black,bfcc,4,0,0,-1,-1)
ELSE
CALL MakeBox(17,29,7,22,%black,bfcc,4,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(2,"Double Horizontal")
CALL Ctrbox(4,"Single Vertical")
IF Zoom THEN
CALL ZoomBox(3,29,7,22,%black,bfcc,5,0,0,-1,-1)
ELSE
CALL MakeBox(3,29,7,22,%black,bfcc,5,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(2,"Single Horizontal")
CALL Ctrbox(4,"No Vertical")
DELAY .53
CALL Pause(7)
END SUB
'[******************]
SUB Screen5a'more frames
SHARED num$(),Zoom
LOCAL frcc,bfcc,ffcc
IF IsColr% THEN
frcc = %red
bfcc = %cyan
ELSE
frcc = %black
bfcc = %White
END IF
IF Zoom THEN
CALL ZoomBox(3,3,7,22,frcc,%white,7,0,0,-1,-1)
ELSE
CALL MakeBox(3,3,7,22,frcc,%white,7,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(2,"Window")
CALL Ctrbox(3,"with")
CALL Ctrbox(4,"Solid Frame")
IF IsColr% THEN
ffcc = %brown
frcc = %blue
ELSE
ffcc = %black
ffcc = %white
END IF
IF Zoom THEN
CALL ZoomBox(3,55,7,22,ffcc,frcc,8,0,0,-1,-1)
ELSE
CALL MakeBox(3,55,7,22,ffcc,frcc,8,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(3,"Light Hatch")
IF Zoom THEN
CALL ZoomBox(17,3,7,22,%black,%white,9,0,0,-1,-1)
ELSE
CALL MakeBox(17,3,7,22,%black,%white,9,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(3,"Medium Hatch")
IF IsColr% THEN
ffcc = %red
ELSE
ffcc = %black
END IF
IF Zoom THEN
CALL ZoomBox(17,55,7,22,ffcc,%white,10,0,0,-1,-1)
ELSE
CALL MakeBox(17,55,7,22,ffcc,%white,10,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(3,"Heavy Hatch")
IF IsColr% THEN
frcc = %cyan
ELSE
frcc = %white
END IF
IF Zoom THEN
CALL ZoomBox(10,29,7,22,%black,frcc,6,0,0,-1,-1)
ELSE
CALL MakeBox(10,29,7,22,%black,frcc,6,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(2,"Double Horizontal")
CALL Ctrbox(4,"No Vertical")
DELAY .53
CALL Pause(5)
END SUB
'[******************]
SUB Screen6'shadows
SHARED Standalone%
LOCAL brc
IF IsColr% THEN bcr = %red ELSE bcr = %black
CALL MakeBox(0,1,26,80,%white,bcr,13,0,0,-1,-1)
CALL CtrBox(1,"- And that Government of the People -")
CALL CtrBox(25,"President Lincoln, Gettysburg National Cemetery,"+_
" Nov 10, 1863")
CALL Prtbox(2,0,CHR$(34)+"█████")
CALL Prtbox(3,1,"█ our score and seven years ago, our fathers brought"+_
" forth on this continent")
CALL Prtbox(4,1,"██ a new nation conceived in liberty and dedicated to"+_
" the proposition that all")
CALL Prtbox(5,1,"█ men are created equal. Now we are engaged in a"+_
" great civil war testing")
CALL Prtbox(6,1,"█ whether that nation or any nation so conceived and"+_
" so dedicated can long")
CALL PrtBox(7,1,"endure. We are met on a great battlefield of that war."+_
" We have come to")
CALL PrtBox(8,1,"dedicate a portion of that field as a final resting"+_
" place for those who here")
CALL PrtBox(9,1,"gave their lives that that nation might live. It is"+_
" altogether fitting and")
IF Standalone% THEN l% = 13 ELSE l% = 16
CALL PrtBox(10,1,"proper that we should do this. But in a larger sense we"+_
" cannot dedicate, we")
CALL PrtBox(11,1,"cannot consecrate, we cannot hallow this ground. The"+_
" brave men,living and dead")
CALL PrtBox(12,1,"who struggled here have consecrated it far above our"+_
" poor power to add or")
CALL PrtBox(l%,1,"detract. The world will little note nor long remember"+_
" what we say here. It is")
CALL PrtBox(l%+1,1,"for us the living rather to be dedicated here to"+_
" the unfinished work which")
CALL PrtBox(l%+2,1,"they who fought here have thus far so nobly advanced."+_
" It is rather for us to")
CALL PrtBox(l%+3,1,"be here dedicated to the great task remaining before us"+_
" that from these")
CALL PrtBox(l%+4,1,"honored dead we take increased devotion to that cause for which"+_
" they gave the")
CALL PrtBox(l%+5,1,"last full measure of devotion - that we here highly resolve"+_
" that these dead")
CALL PrtBox(l%+6,1,"shall not have died in vain, that this nation under God"+_
" shall have a new birth")
CALL PrtBox(l%+7,1,"of freedom and that government of the people, by"+_
" the people, for the people,")
CALL PrtBox(l%+8,1,"shall not perish from the earth."+CHR$(34))
IF NOT Standalone% THEN
CALL MakeBox(13,15,3,52,%white,bcr,1,0,0,-1,-1)
CALL CtrBox(1,"There are 10 Shadows available:")
DELAY .4
END IF
END SUB
'[******************]
SUB Screen7'more shadows
SHARED num$(),Zoom
LOCAL x%,a$,a!,b!,fcr,bcr
IF IsColr% THEN fcr = %red ELSE fcr = %black
IF Zoom THEN
CALL ZoomBox(3,3,7,22,fcr,%white,1,0,0,-1,-1)
ELSE
CALL MakeBox(3,3,7,22,fcr,%white,1,0,0,-1,-1)
END IF
CALL Pointers
CALL Ctrbox(2,"Window")
CALL Ctrbox(3,"with")
CALL Ctrbox(4,"No Shadow")
IF IsColr% THEN
fcr = %brown
bcr = %blue
ELSE
fcr = %black
bcr = %white
END IF
IF Zoom THEN
CALL ZoomBox(17,55,7,22,fcr,bcr,1,1,0,-1,-1)
ELSE
CALL MakeBox(17,55,7,22,fcr,bcr,1,1,0,-1,-1)
END IF
CALL Prtbox(3,1,CHR$(27))
CALL Ctrbox(5,CHR$(25))
CALL Ctrbox(2,"Left Drop")
CALL Ctrbox(3,"Solid Shadow")
IF Zoom THEN
CALL ZoomBox(10,29,7,22,%black,%white,1,2,0,-1,-1)
ELSE
CALL MakeBox(10,29,7,22,%black,%white,1,2,0,-1,-1)
END IF
CALL Ctrbox(5,CHR$(25))
CALL Prtbox(3,20,CHR$(26))
CALL Ctrbox(2,"Right Drop")
CALL Ctrbox(3,"Solid Shadow")
IF IsColr% THEN fcr = 20 ELSE fcr = 31
CALL Boxtitle(2,"Press Spacebar",fcr,7)
IF IsColr% THEN fcr = %red ELSE fcr = %black
IF Zoom THEN
CALL ZoomBox(3,55,7,22,fcr,%white,1,3,0,-1,-1)
ELSE
CALL MakeBox(3,55,7,22,fcr,%white,1,3,0,-1,-1)
END IF
CALL Prtbox(3,1,CHR$(27))
CALL Ctrbox(5,CHR$(25))
CALL Ctrbox(2,"Left Drop")
CALL Ctrbox(3,"Transparent Shadow")
IF IsColr% THEN bcr = %cyan ELSE bcr = %white
IF Zoom THEN
CALL ZoomBox(17,3,7,22,%black,bcr,1,4,0,-1,-1)
ELSE
CALL MakeBox(17,3,7,22,%black,bcr,1,4,0,-1,-1)
END IF
CALL Ctrbox(5,CHR$(25))
CALL Prtbox(3,20,CHR$(26))
CALL Ctrbox(2,"Right Drop")
CALL Ctrbox(3,"Transparent Shadow")
a! = TIMER
DO
B! = TIMER
IF INSTAT THEN
a$=INKEY$
IF A$ = " " THEN EXIT LOOP
END IF
LOOP UNTIL b! = > a! + %AutoTime + AutoFudge%
FOR x% = 1 TO 5
CALL Removebox
NEXT
IF Zoom THEN
CALL ZoomBox(3,55,7,22,fcr,%white,1,5,0,-1,-1)
ELSE
CALL MakeBox(3,55,7,22,fcr,%white,1,5,0,-1,-1)
END IF
CALL Prtbox(3,1,CHR$(27))
CALL Ctrbox(5,CHR$(25))
CALL Ctrbox(2,"Left Drop")
CALL Ctrbox(3,"Light Hatch")
CALL Ctrbox(4,"Shadow")
IF IsColor THEN
fcr = %brown
bcr = %blue
ELSE
fcr = %black
bcr = %white
END IF
IF Zoom THEN
CALL ZoomBox(3,3,7,22,fcr,bcr,1,6,0,-1,-1)
ELSE
CALL MakeBox(3,3,7,22,fcr,bcr,1,6,0,-1,-1)
END IF
CALL Prtbox(3,20,CHR$(26))
CALL Ctrbox(5,CHR$(25))
CALL Ctrbox(2,"Right Drop")
CALL Ctrbox(3,"Light Hatch")
CALL Ctrbox(4,"Shadow")
IF Zoom THEN
CALL ZoomBox(17,3,7,22,%black,%white,1,7,0,-1,-1)
ELSE
CALL MakeBox(17,3,7,22,%black,%white,1,7,0,-1,-1)
END IF
CALL Ctrbox(5,CHR$(25))
CALL Prtbox(3,1,CHR$(27))
CALL Ctrbox(2,"Left Drop")
CALL Ctrbox(3,"Medium Hatch")
CALL Ctrbox(4,"Shadow")
IF IsColr% THEN fcr = %red ELSE fcr = %black
IF Zoom THEN
CALL ZoomBox(17,55,7,22,fcr,%white,1,8,0,-1,-1)
ELSE
CALL MakeBox(17,55,7,22,fcr,%white,1,8,0,-1,-1)
END IF
CALL Prtbox(3,20,CHR$(26))
CALL Ctrbox(5,CHR$(25))
CALL Ctrbox(2,"Right Drop")
CALL Ctrbox(3,"Medium Hatch")
CALL Ctrbox(4,"Shadow")
IF IsColr% THEN bcr = %cyan ELSE bcr = %white
IF Zoom THEN
CALL ZoomBox(3,29,7,22,%black,bcr,1,9,0,-1,-1)
ELSE
CALL MakeBox(3,29,7,22,%black,bcr,1,9,0,-1,-1)
END IF
CALL Ctrbox(5,CHR$(25))
CALL Prtbox(3,1,CHR$(27))
CALL Ctrbox(2,"Left Drop")
CALL Ctrbox(3,"Heavy Hatch")
CALL Ctrbox(4,"Shadow")
IF Zoom THEN
CALL ZoomBox(17,29,7,22,%black,bcr,1,10,0,-1,-1)
ELSE
CALL MakeBox(17,29,7,22,%black,bcr,1,10,0,-1,-1)
END IF
CALL Ctrbox(5,CHR$(25))
CALL Prtbox(3,20,CHR$(26))
CALL Ctrbox(2,"Right Drop")
CALL Ctrbox(3,"Heavy Hatch")
CALL Ctrbox(4,"Shadow")
IF IsColr% THEN fcr = 20 ELSE fcr = 31
CALL Boxtitle(2,"Press Spacebar",fcr,7)
a! = TIMER
DO
b! = TIMER
IF INSTAT THEN
a$ = INKEY$
IF A$ = " " THEN EXIT LOOP
END IF
LOOP UNTIL b!=>A! +%AutoTime + AutoFudge
FOR x% = 1 TO 6
CALL Removebox
NEXT
IF IsColr% THEN
CALL Boxtitle(6,"Press Spacebar",23,%red)
ELSE
CALL BoxTitle(6,"Press Spacebar",31,0)
END IF
CALL Minorpause(2," ")
END SUB
'[******************]
SUB Screen8'Title demo
SHARED num$()
LOCAL a!,b!,fcr,fbcr,bbcr,bcr,cc1,cc2,cc3,bk,i
IF IsColr% THEN fcr = %green ELSE fcr = %white
CALL MakeBox(9,28,5,51,fcr,%black,0,0,0,-1,-1)
CALL Ctrbox(2,"There are 12 Title Positions available:")
CALL Ctrbox(3,"6 Horizontal and 6 vertical")
IF IsColr% THEN
fcr = %red
ELSE
fcr = %black
END IF
CALL MakeBox(3,35,7,28,fcr,%white,1,0,0,%white,fcr)
CALL Ctrallbox(1,4,"Window")
CALL Ctrallbox(2,4,"with")
CALL Ctrallbox(3,4,"Horizontal")
CALL Ctrallbox(4,4,"Titles in top and bottom")
CALL Boxtitle(1,num$(1),-1,-1)
CALL Boxtitle(2,num$(2),-1,-1)
CALL Boxtitle(3,num$(3),-1,-1)
CALL Boxtitle(4,num$(4),-1,-1)
CALL Boxtitle(5,num$(5),-1,-1)
CALL Boxtitle(6,num$(6),-1,-1)
IF IsColr% THEN
fbcr = %yellow
bbcr = %blue
ELSE
fbcr = %white
bbcr = %black
END IF
CALL MakeBox(14,35,9,28,%black,%white,1,1,0,fbcr,bbcr)
CALL Ctrallbox(1,4,"Window")
CALL Ctrallbox(2,4,"with")
CALL Ctrallbox(3,4,"Horizontal and Vertical")
CALL Ctrallbox(4,4,"Titles Centered")
CALL Boxtitle(2,num$(2),-1,-1)
CALL Boxtitle(5,num$(5),-1,-1)
CALL Boxtitle(7,num$(7),-1,-1)
CALL Boxtitle(8,num$(8),-1,-1)
IF IsColr% THEN
bcr = %green
ffcr = %red
ELSE
bcr = %white
ffcr = %black
END IF
CALL MakeBox(3,4,21,24,%black,bcr,1,2,0,ffcr,%white)
CALL Ctrallbox(1,4,"Window")
CALL Ctrallbox(2,4,"with")
CALL Ctrallbox(3,4,"Vertical")
CALL Ctrallbox(4,4,"Titles in Four Corners")
CALL Boxtitle(9,num$(9),-1,-1)
CALL Boxtitle(10,num$(10),-1,-1)
CALL Boxtitle(11,num$(11),-1,-1)
CALL Boxtitle(12,num$(12),-1,-1)
CALL Pause(4)
IF IsColr% THEN
cc1 = %blue
cc2 = %cyan
cc3 = %blue
bk = 1
ELSE
cc1 = %black
cc2 = %black
cc3 = %white
bk = 4
END IF
CALL MakeBox(10,26,9,28,%white,cc1,bk,1,0,cc3,cc2)
CALL Ctrallbox(1,6,"This demo shows")
CALL Ctrallbox(2,6,"removal of a title")
CALL Ctrallbox(3,6,"and restoring the")
CALL Ctrallbox(4,6,"original border")
CALL CtrAllBox(6,6,"Press any key to remove")
CALL Boxtitle(2,"Watch this title",-1,-1)
a! = TIMER
DO
b! = TIMER
IF INSTAT THEN
j$ = INKEY$
EXIT LOOP
END IF
LOOP UNTIL B! => A! + %AutoTime +AutoFudge%
CALL BoxTitle(2,"",-1,-1)
FOR i = 1 TO 6
CALL PrtEol(i,1)
NEXT
CALL CtrAllBox(1,1,"Notice: No title!")
CALL Pause(1)
END SUB
'[******************]
SUB Screen9'menus
SHARED mlist$(),num$()
LOCAL cc1,cc2,barc,textbc,highb,highc
mlist$(1) = "Onions"
mlist$(2) = "Beets"
mlist$(3) = "Peas"
mlist$(4) = "Tomatoes"
mlist$(5) = "Beans"
mlist$(6) = "Corn"
mlist$(7) = "Carrots"
mlist$(8) = ""
mitem% =1
CALL Screen9a("Menu 1 has first letter$selection and a Pointer to$the"+_
" item. Press Enter after$selecting.")
IF IsColr% THEN
cc1 = %white
cc2 = %blue
cc3 = %Black
cc4 = %Red
ELSE
cc1 = %White
cc2 = %Black
cc3 = cc2
cc4 = cc1
END IF
CALL MakeBox(10,39,9,22,cc1,cc2,1,1,0,cc3,cc4)
CALL Boxtitle(2,"Menu",-1,-1)
IF IsColr% THEN
barc = %Cyan
textbc = %BrightWhite
highb = -1
highc = %BrightWhite
PtrCol% = %Red
ELSE
barc = %White
textbc = %BrightWhite
highb = %Black
highc = %BrightWhite
PtrCol% = %BrightWhite
END IF
CALL Buildmenu_
(mitem%,1,-1,0,highc,highb,textbc,barc,3,mlist$(),-1,PtrCol%)
$IF 0
\ \ \ \ \ \ \ \ \ \ \__ AutoRun
\ \ \ \ \ \ \ \ \ \______ The list
\ \ \ \ \ \ \ \ \__________ BmBar (Bar type)
\ \ \ \ \ \ \ \___________ Bar color
\ \ \ \ \ \ \____________ Text in a bar color
\ \ \ \ \ \_____________ Highlight background
\ \ \ \ \_______________ Highlight text color
\ \ \ \_________________ <ENTER> reqd if true
\ \ \___________________ Select + highlight char
\ \_____________________ Item to first highlight
\_________________________ returns selected item
$ENDIF
CALL Boxtitle(5,mlist$(mitem%)+" selected",-1,-1)
CALL Pause(2)
mlist$(1) = "Power"
mlist$(2) = "BASIC"
mlist$(3) = "Is"
mlist$(4) = "The"
mlist$(5) = "Best"
mlist$(6) = "And"
mlist$(7) = "Fastest"
mlist$(8) = "@#$"
CALL Screen9a("Menu 2 has first letter$and full bar. Pressing$the key"+_
" of the first$character selects.")
CALL MakeBox(10,39,9,22,cc1,cc2,1,1,0,cc3,cc4)
CALL Boxtitle(2,"Menu",-1,-1)
CALL Buildmenu(mitem%,1,-1,0,highc,highb,textbc,barc,2,mlist$(),-1,PtrCol%)
CALL Boxtitle(5,mlist$(mitem%)+" selected",-1,-1)
CALL Pause(2)
mlist$(1) = "Windows"
mlist$(2) = "Windows"
mlist$(3) = "Boxes"
mlist$(4) = "Both"
mlist$(5) = "Wonderful"
mlist$(6) = "Better"
mlist$(7) = "Fastest"
mlist$(8) = "@#$"
CALL Screen9a("First letter selection.$Enter is required. If two$"+_
"First letters are the$same, press the key again.")
CALL MakeBox(10,39,9,22,cc1,cc2,1,1,0,cc3,cc4)
CALL Boxtitle(2,"Menu",-1,-1)
CALL Buildmenu(mitem%,1,-1,-1,highc,highb,textbc,barc,1,mlist$(),-1,PtrCol%)
CALL Boxtitle(5,mlist$(mitem%)+" selected",-1,-1)
CALL Pause(2)
END SUB
'[******************]
SUB Screen9a(message$)
LOCAL mesline$(),p%,k%,Height%,x%
Height = TALLY(Message$,"$")
REDIM MesLine$(Height)
FOR X = 1 TO Height
p% = INSTR(message$,"$")
MesLine$(x) = LEFT$(Message$,p%-1)
Message$ = MID$(Message$,p%+1)
NEXT
MesLine$(x) = Message$
IF IsColr% THEN
CALL MakeBox(17,3,Height+3,29,%black,%green,1,2,0,%red,%white)
ELSE
CALL MakeBox(17,3,Height+3,29,%Black,%White,1,2,0,%black,%White)
END IF
FOR x = 1 TO Height+1
CALL Prtbox(x,1,mesline$(x))
NEXT
END SUB
'[******************]
SUB Screen10
SHARED Standalone%,a$
LOCAL A!,b!
Standalone% = %True
CALL Screen6
Standalone% = %False
IF IsColr THEN cc3 = %Black ELSE cc3 = %BrightWhite
CALL PrtAttrBox(23,55,"[Any key to Recolor]",cc3,-1)
A! = TIMER
DO
b! = TIMER
IF INSTAT THEN
a$ = INKEY$
EXIT LOOP
END IF
LOOP UNTIL B!=>A!+%AutoTime +AutoFudge%
IF IsColr% THEN
CALL Recolor(%Black,%Brown,-1,-1)
ELSE
CALL Recolor(%Black,%White,-1,-1)
END IF
CALL PrtEol(23,55)
IF IsColr% THEN
CALL PrtAttrBox(23,55,"[Any key to Recolor]",%Red,-1)
ELSE
CALL PrtAttrBox(23,55,"[Any key to Recolor]",15,-1)
END IF
A! = TIMER
DO
b! = TIMER
IF INSTAT THEN
a$ = INKEY$
EXIT LOOP
END IF
LOOP UNTIL B!=>A!+%AutoTime +AutoFudge%
IF IsColr% THEN cc2 = %Blue ELSE cc2 = %black
CALL Recolor(%BrightWhite,cc2,-1,-1)
CALL PrtEol(23,55)
IF IsColr% THEN cc3 = %Green ELSE cc3 = %White
CALL PrtAttrBox(23,55,"[Any key for menu]",cc3,-1)
A! = TIMER
DO
b! = TIMER
IF INSTAT THEN
a$ = INKEY$
EXIT LOOP
END IF
LOOP UNTIL B!=>A!+%AutoTime+AutoFudge%
END SUB
'[******************]
SUB Screen11' horizontal pull down menu
' This can be pulled down and moved with the <-- and --> keys
LOCAL Window1$,Window2$,Window3$,window4$
SHARED NewPlace
Window1$ = "PBWindow Info"
Window2$ = "System Info"
Window3$ = "Date & Time"
Window4$ = "Quit"
IF IsColr% THEN
AtFc% = %Red
AtBc% = -1
ELSE
AtFc% = %White
AtBc% = %Black
END IF
' good for mono and color.. b&w window across the top
CALL MakeBox(1,1,1,79,0,7,0,0,0,-1,-1)
CALL PrtBox(0,1,Window1$)
CALL PrtBox(0,20,Window2$)
CALL PrtBox(0,40,Window3$)
CALL PrtBox(0,60,Window4$)
CALL PrtAttrBox(0,1,Window1$,AtFc%,AtBc)
place = 1
FallThrough = %False
DO
a! = TIMER
SetUp = %False
DO
b! = TIMER
IF INSTAT THEN
A$ = INKEY$
EXIT LOOP
END IF
IF NOT SetUp THEN
IF NOT FallThrough THEN
a$ = CHR$(13)
FallThrough = %True
ELSE
FallThrough = %False
a$ = CHR$(0,77)
END IF
SetUp = %True
END IF
LOOP UNTIL b!=>A! +%AutoTime +AutoFudge
match$=UCASE$(LEFT$(Window1$,1)+LEFT$(Window2$,1)+_
LEFT$(Window3$,1)+LEFT$(Window4$,1))
IF INSTR(UCASE$(a$),ANY Match$)>0 THEN a$="$$"+UCASE$(a$)
NewPlace = %False
Moved = %False
ExitBigLoop = %False
DO
SELECT CASE LEN(a$)
CASE 1
SELECT CASE a$
CASE CHR$(13)'enter this one iwl be scren 11
Moved = %False
IF Place = 4 THEN
EXITBigLoop = %True
EXIT LOOP
ELSE
CALL Screen12(Place)
IF NewPlace THEN
A$ = KeyHit$
Moved = %True
END IF
END IF
END SELECT
CASE 2
SELECT CASE ASC(MID$(a$,2,1))
CASE 75' <---
SELECT CASE place
CASE 1
CALL PrtBox(0,1,Window1$)
CALL PrtAttrBox(0,60,Window4$,_
AtFc%,AtBc%)
place = 4
CASE 2
CALL PrtBox(0,20,Window2$)
CALL PrtAttrBox(0,1,Window1$,_
AtFc%,AtBc%)
place = place -1
CASE 3
CALL PrtBox(0,40,Window3$)
CALL PrtAttrBox(0,20,Window2$,_
AtFc%,AtBc%)
place = place -1
CASE 4
CALL PrtBox(0,60,Window4$)
CALL PrtAttrBox(0,40,Window3$,_
AtFc%,AtBc%)
place = place -1
END SELECT
CASE 77'--->
SELECT CASE Place
CASE 4
CALL PrtBox(0,60,Window4$)
CALL PrtAttrBox(0,1,Window1$,_
AtFc%, AtBc%)
Place = 1
CASE 3
CALL PrtBox(0,40,Window3$)
CALL PrtAttrBox(0,60,Window4$,_
AtFc%,AtBc%)
INCR Place
CASE 2
CALL PrtBox(0,20,Window2$)
CALL PrtAttrBox(0,40,Window3$,_
AtFc%,AtBc%)
INCR Place
CASE 1
CALL PrtBox(0,1,Window1$)
CALL PrtAttrBox(0,20,Window2$,_
AtFc%,AtBc%)
INCR Place
END SELECT
CASE 71'home
SELECT CASE Place
CASE 1'nothing.. we are home
CASE 2
CALL PrtBox(0,20,Window2$)
CASE 3
CALL PrtBox(0,40,Window3$)
CASE 4
CALL PrtBox(0,60,Window4$)
END SELECT
place = 1
CALL PrtAttrBox(0,1,Window1$,AtFc%,AtBc%)
CASE 79'end
SELECT CASE place
CASE 1
CALL PrtBox(0,1,Window1$)
CASE 2
CALL PrtBox(0,20,Window2$)
CASE 3
CALL PrtBox(0,40,Window3$)
CASE 4'nothing we are at the end
END SELECT
CALL PrtAttrBox(0,60,Window4$,AtFc%,AtBc%)
Place = 4
END SELECT
IF Moved THEN
SELECT CASE Place
CASE 1
A$ = "$$"+ LEFT$(Window1$,1)
CASE 2
A$ = "$$"+ LEFT$(Window2$,1)
CASE 3
A$ = "$$"+ LEFT$(Window3$,1)
END SELECT
END IF
CASE 3
SELECT CASE Place
CASE 1
windo$=Window1$
Spot = 1
CASE 2
Windo$=Window2$
Spot = 20
CASE 3
Windo$= Window3$
Spot = 40
CASE 4
Windo$ = Window4$
Spot = 60
END SELECT
SELECT CASE MID$(a$,3,1)
CASE LEFT$(Window1$,1)
CALL PrtBox(0,Spot,Windo$)
CALL PrtAttrBox(0,1,Window1$,AtFc%,AtBc%)
Place = 1
CASE LEFT$(Window2$,1)
CALL PrtBox(0,Spot,Windo$)
CALL PrtAttrBox(0,20,Window2$,AtFc%,AtBc%)
Place = 2
CASE LEFT$(Window3$,1)
CALL PrtBox(0,Spot,Windo$)
CALL PrtAttrBox(0,40,Window3$,AtFc%,AtBc%)
Place = 3
CASE LEFT$(Window4$,1)
CALL PrtBox(0,Spot,Windo$)
CALL PrtAttrBox(0,60,Window4$,AtFc%,AtBc%)
Place = 4
END SELECT
IF Moved THEN
A$ = CHR$(13)
END IF
END SELECT
LOOP UNTIL NOT MOVED
LOOP UNTIL ExitBigLoop
DO UNTIL Wpt% = 0
CALL RemoveBox
LOOP
END SUB
'[******************]
SUB Screen12(where)'places the asked for menues
SHARED NewPlace
IF IsColr% THEN
ofc1 = %white'Red
obc1 = %Blue
obfc1 = -1
obbc1 = -1
obbc2 = %Magenta
obfc2 = %Green
obc2 = %Cyan
ofc2 = %Cyan
ofc3 = %BLack
obc3 = %Cyan
obfc3 =%LtBlue
obbc3 = %Blue
ofc4 = %Red
obc4 = %White
obfc4 = %Black'Green
obbc4 = %Magenta
ofc5 = %black
obc5 = %cyan
obfc5 = %Red
obbc4 = %White
ELSE
ofc1 = %White
obc1 = %Black
obfc1 = -1
obbc1 = -1
obfc2 = %Black
obbc2 = %White
obc2 = %White
ofc2 = %Black
ofc3 = %Black
obc3 = %White
obfc3 =%White
obbc3 = %Black
ofc4 = %White
obc4 = %Black
obfc4 =%White
obbc4 = %Black
ofc5 = %White
obc5 = %Black
obfc5 = %Black
obbc5 = %White
END IF
SELECT CASE Where
CASE 1
'make 6 windows
CALL MakeBox(2,2,4,17,ofc1,obc1,2,0,1,obfc1,obbc1)
CALL CtrBox(1,"PowerBASIC")
CALL CtrBox(2,"By: Robert Zale")
CALL MakeBox(6,9,2,2,ofc2,obc2,0,0,1,obfc2,obbc2)
CALL MakeBox(8,1,4,20,ofc3,obc3,2,1,0,obfc3,obbc3)
CALL CtrBox(1,"Distributed by:")
CALL CtrBox(2,"Spectra Publishing")
CALL MakeBox(12,4,2,2,ofc2,obc2,0,0,1,obfc2,obbc2)
CALL MakeBox(12,16,2,2,ofc2,obc2,0,0,1,obfc2,obbc2)
CALL MakeBox(14,1,4,20,ofc4,obc4,2,1,0,obfc4,obbc4)
CALL CtrBox(1,"PBWindows")
CALL CtrBox(2,"By: Barry Erick")
CALL BoxTitle(5,"Press any key",-1,-1)
CALL MinorPause(6,CHR$(255))
' end case 1
CASE 2
'make 1 windows
CALL MakeBox(2,19,6,22,ofc5,obc5,2,0,1,obfc5,obbc5)
CALL CtrBox(1,"DOS Version :"+DosVersion$)
CALL CtrBox(2,"Video Mode is "+ColorOrMono$)
CALL CtrBox(3,"Memory: " + Memory$)
j$ = StR$(WhatCpu%)
CALL CtrBox(4,"The CPU is a "+MID$(j$,2))
CALL BoxTitle(5,"Press any key",-1,-1)
CALL MinorPause(1,CHR$(255))
'end case 2
CASE 3
' make one window
CALL MakeBox(2,37,4,22,ofc1,obc1,2,0,0,-1,-1)
CALL CtrBox(1,LEFT$(TIME$,5)+" ")
CALL CtrBox(2,Weekday$+" "+Month$+" "+Day$+","+Year$)
CALL BoxTitle(5,"Press any key",-1,-1)
CALL MinorPause(1,CHR$(255))
END SELECT
IF LEN(KeyHit$) = 2 THEN
SELECT CASE ASC(MID$(KeyHit$,2,1))
CASE 75,77
NewPlace = %True
CASE ELSE
NewPlace = %False
KeyHit$=""
END SELECT
ELSE
NewPlace = 0
KeyHit$ = ""
END IF
END SUB
'[******************]
FUNCTION DOSVersion$
REG 1,&H30*256
CALL INTERRUPT &H21
al = REG(1) MOD 256
ah = REG(1) \ 256
al$ = STR$(al)
ah$ = STR$(ah)
DosVersion$ = al$+"."+MID$(ah$,2,2)
END FUNCTION
'[******************]
Function ColorOrMono$
IF isColr% THEN
ColorOrMono$ = "Color"
ELSE
ColorOrMono$ = "Mono"
END IF
END FUNCTION
'[******************]
'[******************]
Function Memory$
CALL INTERRUPT &H12
AX& = REG(1)
Memory$ = MID$(STR$(AX&),2)+"k"
END FUNCTION
'[******************]
$SEGMENT
' For the demo, have EnglishNumbers for the title areas
DIM num$(12)
RESTORE Englishnumbers
FOR x% = 1 TO 12
READ num$(x%)
NEXT
' use the users background for the demo
CLS
CALL Date
COLOR %white,%black
CALL Screen1(0)
'make menu list
LastMi% = 1
AutoIt% = %False
NoNoise% = %True 'PbWindow.pbu makes this false when started, but
' let's keep it quiet here to start
DO
IF mlist$(1) <> "Scroll Demo" THEN
mlist$(1) = "Scroll Demo"
mlist$(2) = "Window Demo"
mlist$(3) = "Frames Demo"
mlist$(4) = "Shadows Demo"
mlist$(5) = "Title Demo"
mlist$(6) = "Menu Demo"
mlist$(7) = "Noise"
mlist$(8) = "Recolor Demo"
mlist$(12) = "Quit"
mlist$(13) = ""
mlist$(9) = "Zoom"
mlist$(10) = "Horiz Menu"
mlist$(11) = "About"
snu% = LastMi%
ELSE
snu% = lastmi%
END IF
IF wpt>0 THEN
DO UNTIL wpt% = 1
CALL Removebox
LOOP
END IF
IF wpt% = 0 THEN
IF IsColr% THEN
CALL MakeBox(2,2,14,22,%yellow,%blue,1,1,0,%blue,%white)
ELSE
CALL MakeBox(2,2,14,22,%white,%black,1,1,0,%black,%white)
END IF
CALL Boxtitle(2,"Menu",-1,-1)
CALL Boxtitle(5,"Select & hit Enter",-1,-1)
END IF
IF NOT Zoom THEN
Mlist$(9)= "Zoom Off"
ELSE
MList$(9) = "Zoom On "
END IF
IF NOT NoNoise% THEN
Mlist$(7) = "Noise On "
ELSE
Mlist$(7) = "Noise Off"
END IF
AutoRun% = %True
IF IsColr% THEN
CALL Buildmenu(mitem%,snu%,-1,-1,15,-1,4,3,1,mlist$(),AutoRun%,-1)
ELSE
CALL Buildmenu(mitem%,snu%,-1,-1,15,0,0,15,2,mlist$(),AutoRun%,-1)
END IF
'AutoRun% is a two way street. On the Call, we sent the
'timeout value we wanted. Returned is the state of having returned
'automatically, or not, %True says we did, %False says we didn't
IF AutoRun% THEN AutoIt% = %True ELSE AutoIt% = %False
IF AutoIt% THEN
AutoBuildTime% = 5'sure.. we hit each time, but lets speed it up
AutoFudge% = 0
ELSE
AutoBuildTime% = ModifiedAutoBuildTime%
AutoFudge% = ModifiedAutoFudge%
END IF
SELECT CASE mitem%
CASE 1
CALL Screen2'scroll demo
LastMi% = mitem%
CASE 2
CALL Screen3'window demo
LastMi% = mitem%
CASE 3
CALL Screen4'frame demo
CALL Screen5
CALL Screen5a
LastMi% = mitem%
CASE 4
CALL Screen6'shadow demo
CALL Screen7
LastMi% = mitem%
CASE 5
CALL Screen8'title demo
LastMi% = mitem%
CASE 6
LastMi% = mitem%
CALL Screen9'menu demo
CASE 7
NoNoise% = NOT NoNoise%
IF NOT NoNoise% THEN
CALL PrtBox(7,10,"On ")
ELSE
CALL PrtBox(7,10,"Off")
END IF
CALL Screen3'window to sound noise or not
LastMi% = mitem%
CASE 8
CALL Screen10'recolor
LastMi% = mitem%
CASE 12
CALL Removebox'quit
IF wpt% >0 THEN'remove all the windows
DO
CALL Removebox
LOOP UNTIL wpt% = 0
END IF
CALL Screen1(-1)
END
LastMi% = mitem%
CASE 9
Zoom = NOT Zoom
IF NOT Zoom THEN
CALL PrtBox(9,9,"Off")
ELSE
CALL PrtBox(9,9,"On ")
END IF
CALL Screen4
CALL Screen5
CALL Screen5a
LastMi% = mitem%
CASE 10
'Horiz Menu
Mlist$(1)="Nothing"' to allow redoing it
DO UNTIL Wpt% = 0
CALL RemoveBox'kill menu
LOOP
CALL Screen11
Lastmi% = mitem%
CASE 11
MList$(1) = "Nothing"
DO UNTIL Wpt% = 0
CALL RemoveBox
LOOP
About = %True
CALL Screen1(0)
About = %False
LastMi% = MItem%
END SELECT
IF AutoIt% THEN
INCR LastMi%
IF LastMi% > 11 THEN LastMi% = 1
END IF
LOOP
END
'[******************]
Englishnumbers:
DATA "One ", "Two ", "Three ", "Four", "Five", "Six ", "Seven ", "Eight "
DATA "Nine", "Ten ", "Eleven", "Twelve"
END