home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
PROGRAMM
/
BUILDER.ZIP
/
LSHELL1.BLD
< prev
next >
Wrap
Text File
|
1992-11-17
|
2KB
|
86 lines
' LSHELL1.BLD
'
' Template for a middle-of-the-screen lightbar menu program. Just plug
' in your own values for each ITEM, then place the appropriate code below
' each ITEM.
'
' To use it, enter this at the DOS command line:
'
' LSHELL1
'
' X & Y position the menu.
integer x,y,xsay,ysay
' IsColor is set to 1 if the screen is color-capable, or 0 if not.
integer IsColor
' All-purpose string variable
string s
' Get the video mode & force screen to 80x25.
s := Adaptor
if s is "Mono"
' Force 80 x 25 mono.
run mode mono
' Remember that it's not a color system.
Put 0 into IsColor
' Set colors for a mono system.
Menu Style White,Black,Bright White,Black,Black,White,White,Black,0,1,2,1
end else
' Force 80 x 25 color
run mode co80
' Remember that it is a color system.
Put 1 into IsColor
' Set colors for a non-mono system.
Menu Style Blue,White,Red,White,White,Black,Black,White,0,1,1,1
end
' Initialize position of menu.
x:=30
y:=7
Cls black on cyan 'Clear the screen and set default colors to black on cyan
' Keep displaying the menu until the user presses {Esc}.
While not cancelled
' Run the subroutine Main.
Main
End
'==================================================================
' SUB Main
'
' What it does:
' Displays the main menu, and directs program control according
' to the user's choice.
'
' Globals affected:
' INTEGER X, Y
'
' Other routines used:
' None
'
'==================================================================
sub Main
LightBar @ y,x
Item "Item 1"
' Any lines of text from the ITEM above, down to but not
' including the next ITEM, will be executed when "Item 1"
' is chosen.
Say @ y + 6, x "Item 1 chosen"
Item "Item 2"
' Any lines of text from the ITEM above, down to but not
' including the next ITEM, will be executed when "Item 2"
' is chosen.
Say @ y + 6, x "Item 2 chosen"
Item "Quit"
' Any lines of text from the ITEM above, down to but not
' including the next ITEM, will be executed when "Quit"
' is chosen.
Say @ y + 6, x "Item Quit chosen"
' Return to DOS.
exit 0
end
end