; First, we'll talk about the Macros we use in the sample menus, and ; then the menus themselves. For more information on what Macros ; are as well as when and how they're used, see Chapter 7 of your ; TBBS reference manual. The discussion on Macros begins on page 7-8. ; USE OF MACROS WITHIN THIS SDL CODE: ; ----------------------------------------------------------------- ; This SDL source code uses a large number of MACROS. They are ; designed to make simple alterations and creation of new menus ; easy for you. Each macro used here is explained prior to its ; definition, in MACRO DEFINITIONS. You are encouraged to make full ; use of these macros when adding new options and menus to this ; code. It is important to note that macros are NOT required in ; SDL -- they can be, however, very helpful. ; USE OF ANSI WITHIN THIS SDL CODE: ; ----------------------------------------------------------------- ; Nearly all display text contained within this code incorporates ; ANSI sequences which provide cursor-movement/positioning as well ; as foreground/background color. Most of these sequences have ; been used within MACROS, so that you can add functionality to ; your system and make minor changes to text/color displays without ; having to deal with ANSI sequences themselves directly (or ; understand their syntax). ; ; If you would like to view or alter these ANSI color macros, they ; can be found in a separate file called "COLORS.SDL". ; ; IMPORTANT NOTE: ; ; ** If you are not familiar with ANSI sequences and their meanings, ; it is highly recommended that you not attempt to make direct ; alterations to them until you fully understand them. ; ANSI is an industry standard and is fairly well-documented. ; ; For a listing of those ANSI codes supported by TBBS, refer to ; page 2-32 through 2-34 of the TBBS (Information Manager) manual. ; MACRO DEFINITIONS: ; (MACROS USED WITHIN THIS CODE, EXPLAINED) ; ----------------------------------------------------------------- ; Macros are commands and strings of text which have been assigned ; to a name, and can therefore be referred to later by that name. ; This way, a long string of commands or text which is to be repeated ; in your menu system can be referenced by a much smaller macro name -- ; saving you time and effort. ; ; To create a macro, you can use either the Macro: and EndMacro: ; commands (for defining large amounts of data), or you can use ; the Equate: command (for short strings of data). ; ; To call a macro, simply use an at sign "@" followed by the macro ; name it has been assigned to. ; ; For more information on what macros are and how they work, please ; refer to Chapter 7 of your TBBS manual, starting with page 7-8 ; before proceeding. ; DOS path where TBBS is installed ; Equate: TBBSPATH = C:\TBBS ; DOS path where files are available for upload and download. ; This macro actually calls the TBBSPATH macro. Because the TBBSPATH ; macro has already been defined (see last macro definition), it can ; be used as a part of later macros. This "macro within a macro" ; nesting can make it very easy to make mass changes by altering only ; one macro's contents. ; ; Because TBBSPATH has been defined as "C:\TBBS" above, the XFERPATH ; macro below ends up equalling "C:\TBBS\XFER". ; Equate: XFERPATH = @TBBSPATH+\XFER ; This macro is used to control where text is displayed on the screen. ; To use this macro, use the following syntax: ; ; @CPOS(row,column) ; Equate: CPOS = [%1;%2H ; This macro displays the contents of a file (presumably a file ; containing an ANSI background image), and then paints a menu title ; overtop of it in the appropriate color. ; Macro: TITLE Entry: {%1} Entry: @BRTWHT+@BCKMAG+@CPOS(3,45)@BBSNAME Entry: @BRTWHT+@BCKBLU+@CPOS(3,5)%2 Endtext: Endmacro: ; The OPTIONS macro is referred to by each of the OPTION macros. ; It is used so that you can change many things about the way a menu ; entry is displayed by altering just this one macro, instead of ; having to change all seven of the OPTION macros (found next). ; ; This moves to a specific line on the screen and the 22nd column, ; and then displays a "<", the specified hotkey letter, and another ; ">" (all in the appropriate colors to blend in with the ANSI ; menu background). ; ; --------------------------------------------------------------------- ; NOTE: If you wanted to change the separaters used here from "< >" to ; something like "[ ]", you would change the OPTIONS macro to read: ; ; @CPOS(%1,5)@BCKBLU+[@YELLOW+%2@BRTWHT+] %3 ; ^ ^ ; If you then wanted to change the color of the highlighted hotkey to ; black instead of yellow, you would alter OPTIONS to read: ; ; @CPOS(%1,5)@BCKBLU+[@BLACK+%2@BRTWHT+] %3 ; ^ ; --------------------------------------------------------------------- ; Macro: OPTIONS @CPOS(%1,5)@BRTWHT+@BCKBLU+<@YELLOW+%2@BRTWHT+> %3 Endmacro: ; The GLOBALS macro performs the same function as the OPTIONS macro ; above, except that it is used by the GLOBAL macros that display ; options at the bottom of each menu. ; Macro: GLOBALS @CPOS(19,%1)@BRTWHT+@BCKGRN+<@YELLOW+%2@BRTWHT+> %3 Endmacro: ; The OPTION macros defined below display the hotkey and text ; description for each of your menu entries. OPTION1 displays the ; first menu option, OPTION2 displays the second, and so on. ; ; These macros use the OPTIONS macro (see last macro definition) to ; do all the real work. Here we simply specify which line the option ; should appear on. Because of the design of the ANSI menu background ; used in this sample menu system, a maximum of 10 menu items can ; appear in any one menu. ; ; NOTE: It is important to note that this is NOT a limitation of the ; TBBS menuing system, and you can create your own menus that have as ; many options as you wish. ; Equate: OPTION1 = @OPTIONS(5,%1,%2) Equate: OPTION2 = @OPTIONS(6,%1,%2) Equate: OPTION3 = @OPTIONS(7,%1,%2) Equate: OPTION4 = @OPTIONS(8,%1,%2) Equate: OPTION5 = @OPTIONS(9,%1,%2) Equate: OPTION6 = @OPTIONS(10,%1,%2) Equate: OPTION7 = @OPTIONS(11,%1,%2) Equate: OPTION8 = @OPTIONS(12,%1,%2) Equate: OPTION9 = @OPTIONS(13,%1,%2) Equate: OPTION10 = @OPTIONS(14,%1,%2) ; These GLOBAL macros work just like the OPTION macros above, except ; that they display options which appear inside the "Global Commands" ; section of the ANSI menu background we've used. Up to 3 of these ; "Global" options can be used in these sample menus. ; Equate: GLOBAL1 = @GLOBALS(5,%1,%2) Equate: GLOBAL2 = @GLOBALS(28,%1,%2) Equate: GLOBAL3 = @GLOBALS(54,%1,%2) ; This macro resets the color and the cursor position so that the ; "Command:" prompt appears at the below the menu and in the desired ; color. ; -------------------------------------------------------------------- ; NOTE: The actual text "Command:" is not contained here, but can ; be found instead in the TBBS language file. The EDLANG editor is ; used to view and edit the language file. It is discussed in the ; TBBS reference manual in Chapter 2 on page 2-28. ; -------------------------------------------------------------------- ; Macro: COMMAND Entry: @BRTWHT+@BCKBLK+@CPOS(23,1)~ Endtext: Endmacro: