home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / PROGRAMM / BUILDER.ZIP / DSHELL1.BLD < prev    next >
Text File  |  1992-11-17  |  2KB  |  78 lines

  1. ' Template for a middle-of-the-screen dropdown menu program
  2.  
  3. ' X & Y position the menu.
  4. integer x,y,xsay,ysay
  5.  
  6. ' IsColor is set to 1 if the screen is color-capable, or 0 if not.
  7. integer IsColor
  8.  
  9. ' All-purpose string variable
  10. string s
  11.  
  12. ' Get the video mode & force screen to 80x25.
  13. s := Adaptor
  14. s := Adaptor
  15.  
  16. if s is "Mono"
  17.   ' Force 80 x 25 mono.
  18.   run mode mono
  19.   ' Remember that it's not a color system.
  20.   Put 0 into IsColor
  21.   Menu Style White,Black,Bright White,Black,Black,White,White,Black,0,1,2,1
  22. end else
  23.   ' Force 80 x 25 color
  24.   run mode co80
  25.   ' Remember that it is a color system.
  26.   Put 1 into IsColor
  27.   ' Preferrred colors for menus.
  28.   Menu Style Blue,White,Red,White,White,Black,Black,White,0,1,1,1
  29. end
  30.  
  31. ' Initialize position of menu.
  32. x:=30
  33. y:=7
  34. Cls black on cyan   'Clear the screen and set default colors to black on cyan
  35.  
  36.  
  37. while not cancelled
  38.   Main
  39. end
  40. Thanks
  41.  
  42. sub Main
  43.   Dropdown "The HYPE Integrator" @ y,x
  44.     Item "Display manual"
  45.     Item "Print manual"
  46.     Item "Quit"
  47.       Thanks
  48.       exit 0
  49.   end
  50. end
  51.  
  52. Sub HelpBox
  53.   If IsColor
  54.     Single Box 17,5,72,8 Yellow on Blue
  55.     Text Bright White on Blue
  56.   end else
  57.     Single Box 17,5,72,8 Bright white on Black
  58.     Text Bright White on Black
  59.   End ' If
  60. End ' sub HelpBox
  61.  
  62. sub Helpfile
  63.    HelpBox
  64.    Say @ 18,29 "<Yellow>  Command Descriptions"
  65.    Say @ 19,6 "Begin                ---> Begin installation"
  66.    Say @ 21,6 "Help                 ---> This screen"
  67.    Say @ 22,6 "Quit                 ---> Exit this program."
  68.    Say @ 23,23 "<Bright Green> Press {Enter} to exit help"
  69.    pause
  70.    Single Box 17,5,72,8 cyan on Cyan
  71. end
  72.  
  73. Sub Thanks
  74.   say "Thanks"
  75. End
  76.  
  77.  
  78.