! FX-NM10.V 6** FREE SCRIPT **0 ! [FiXx] NiFT Menu Routines v1.0 ! The /<-rAd Menu Script, released under GNU Public License ! Featuring Scrollable Menu Bar, Easy Configuration, and *Source Code* ! ! By: Christopher Heschong (CtG) (Christopher the Great) ! ctg@wiw.org Internet ! 1@ 1615004 VirtualNET / FiXxNET / [VSB]Net ! 1@ 61501 The Collective ! ! NOTICE: This script by itself doesn't do anything at all. You have to ! code in the options yourself. This is merely to facilitate programming ! of other scripts. I trust that the programmers using these routines can ! at least see what they do and change them to suit their wishes. ! ! You can, and certainly should, modify this do do other, more imaginative ! things than what it currently does. You could, in fact, use this sample ! script to create your entire menu system. I've tried to make it as easily ! configurable as possible by putting all the main variables up top, and all ! the routines for each option at the bottom. If any of this doesn't make ! sense, please let me know via e-mail or whatever. Also, if you do make a ! program with these routines, please send me a copy. I love to see the kind ! of stuff you all put out. Anywayz... ! ! Please Use, Modify, Distribute, and Copy this script to your heart's ! content, with or without acknowledgements to me. ! ! Begun : 07-20-94 ! Last Modified: 12-10-94 ! Rev. History : ! 07-21-94 : Initial Release ! 08-08-94 : Fixed remote arrow key problem (I think) ! 08-13-94 : Really fixed the remote arrow key problem, because it wasn't ! actually fixed before ! 08-14-94 : Fixed "Other Key" syndrome, and made logoff easier ! 08-16-94 : Fixed little display problem ! 08-18-94 : Added Background Feature for Background ANSI Wallpaper. ! This can make your screen look really awesome, considering now ! you can put any ANSI as a background, and then put the menu ! anywhere on the screen. I impress myself sometimes ! : Improved bar redraw speed 400% by making the bar drawing ! code into a procedure (yay yay for modularity!) ! : Made Script a bit more readable and a bit more configurable, ! as well as making the configuration area more obvious ! 12-10-94 : Re-Wrote parts, to make it much, much more configurable, and to ! make it easy to put lots of options in it. ! NEW!!! The $background file must have the box in it. Or, you ! can hard code it in at the "# box" area. ! Re-Released as FX-NM10.V - That is: [FiXx] NiFT Routines v1.0 ! All Configuration can be done at the top. Then, all the things that the ! Options do go at the end. Feel free to edit the number of options to make ! it go a bit faster. The next major release (v2.0) will use actual ANSi ! codes, which will theoretically speed things up at least a little. ! System Variable Initialization - **YOU** Configure these ! þþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþ $background = "t:\bckgrnd.ans" ! Background ANSI Wallpaper File $startx = 50 ! Starting x Position for window $starty = 12 ! Starting y Position for window $barwidth = 21 ! Width of Lightbar $barcolor = "K" ! Color of Menu Bars $backcolor = "U" ! Color of Menu Background $lastopt = "%UNUSED%" ! Put this for your Last Option! $numoptions = 7 ! Number of Options $barpos = 1 ! Starting Bar Position $option1 = "Page SysOp" ! The actual options $option2 = "Send Feedback" ! Note: Configure what they do down at $option3 = "Log Off" ! the bottom of this script. $option4 = "Return to BBS" $option5 = "Something" $option6 = "Something Else" $option7 = "Blah" $option8 = $lastopt $option9 = $option10 = $option11 = $option12 = $option13 = $option14 = $option15 = $option16 = $option17 = $option18 = $option19 = $option20 = ! þþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþ jc $option1 $barwidth jc $option2 $barwidth jc $option3 $barwidth jc $option4 $barwidth jc $option5 $barwidth jc $option6 $barwidth jc $option7 $barwidth jc $option8 $barwidth jc $option9 $barwidth jc $option10 $barwidth jc $option11 $barwidth jc $option12 $barwidth jc $option13 $barwidth jc $option14 $barwidth jc $option15 $barwidth jc $option16 $barwidth jc $option17 $barwidth jc $option18 $barwidth jc $option19 $barwidth jc $option20 $barwidth jc $lastopt $barwidth ! Internal Variable Initialization $up = 254 chr 0 ! Cursor Key Constants (For Local Arrows) $down = 253 chr 0 $right = 251 chr 0 $left = 252 chr 0 $escape = 27 chr 0 ! Escape Key Constant (For Remote Arrows) $bottom = $numoptions $hidden = $startx + $barwidth - 1 $winbottomy = $starty + $bottom + 1 $winbottomx = $startx # NiFT call box ! Display the Options $tmpx = $startx $tmpy = $starty call dnln tr $backcolor $option1 call dnln tr $backcolor $option2 test $option3 = $lastopt getkey call dnln tr $backcolor $option3 test $option4 = $lastopt getkey call dnln tr $backcolor $option4 test $option5 = $lastopt getkey call dnln tr $backcolor $option5 test $option6 = $lastopt getkey call dnln tr $backcolor $option6 test $option7 = $lastopt getkey call dnln tr $backcolor $option7 test $option8 = $lastopt getkey call dnln tr $backcolor $option8 test $option9 = $lastopt getkey call dnln tr $backcolor $option9 test $option10 = $lastopt getkey call dnln tr $backcolor $option10 test $option11 = $lastopt getkey call dnln tr $backcolor $option11 test $option12 = $lastopt getkey call dnln tr $backcolor $option12 test $option13 = $lastopt getkey call dnln tr $backcolor $option13 test $option14 = $lastopt getkey call dnln tr $backcolor $option14 test $option15 = $lastopt getkey call dnln tr $backcolor $option15 test $option16 = $lastopt getkey call dnln tr $backcolor $option16 test $option17 = $lastopt getkey call dnln tr $backcolor $option17 test $option18 = $lastopt getkey call dnln tr $backcolor $option18 test $option19 = $lastopt getkey call dnln tr $backcolor $option19 test $option20 = $lastopt getkey call dnln tr $backcolor $option20 # getkey $clr = $barcolor call putbar rc $key test $key = $escape arrowkey endif ts $bs test $key = $up up test $key = 8 up test $key = $down down test $key = 2 down test $key = "|" log ! Now go to the actual Options if $key = $cr test $barpos = 1 option1 test $barpos = 2 option2 test $barpos = 3 option3 test $barpos = 4 option4 test $barpos = 5 option5 test $barpos = 6 option6 test $barpos = 7 option7 test $barpos = 8 option8 test $barpos = 9 option9 test $barpos = 10 option10 test $barpos = 11 option11 test $barpos = 12 option12 test $barpos = 13 option13 test $barpos = 14 option14 test $barpos = 15 option15 test $barpos = 16 option16 test $barpos = 17 option17 test $barpos = 18 option18 test $barpos = 19 option19 test $barpos = 20 option20 endif go getkey ! Draw the Box Around your Stuff # box tr $clear suspendpagebreak ef $background resumepagebreak ret # dnln $tmpy = $tmpy + 1 loc $tmpy $tmpx ret ! Bar Movement Procedures # arrowkey rc $key ts $bs rc $key test $key = A up test $key = B down ! test $key = C right ! test $key = D left # up $clr = $backcolor call putbar $barpos = $barpos - 1 if $barpos = 0 $barpos = $bottom endif go getkey # down $clr = $backcolor call putbar $barpos = $barpos + 1 $foo = $bottom + 1 if $barpos = $foo $barpos = 1 endif go getkey # putbar $tmpy = $starty + $barpos loc $tmpy $startx if $barpos = 1 tr $clr $option1 endif if $barpos = 2 tr $clr $option2 endif if $barpos = 3 tr $clr $option3 endif if $barpos = 4 tr $clr $option4 endif if $barpos = 5 tr $clr $option5 endif if $barpos = 6 tr $clr $option6 endif if $barpos = 7 tr $clr $option7 endif if $barpos = 8 tr $clr $option8 endif if $barpos = 9 tr $clr $option9 endif if $barpos = 10 tr $clr $option10 endif if $barpos = 11 tr $clr $option11 endif if $barpos = 12 tr $clr $option12 endif if $barpos = 13 tr $clr $option13 endif if $barpos = 14 tr $clr $option14 endif if $barpos = 15 tr $clr $option15 endif if $barpos = 16 tr $clr $option16 endif if $barpos = 17 tr $clr $option17 endif if $barpos = 18 tr $clr $option18 endif if $barpos = 19 tr $clr $option19 endif if $barpos = 20 tr $clr $option20 endif loc $winbottomy $winbottomx ret # log logoff # option1 go NiFT # option2 go NiFT # option3 go NiFT # option4 go NiFT # option5 go NiFT # option6 go NiFT # option7 go NiFT # option8 go NiFT # option9 go NiFT # option10 go NiFT # option11 go NiFT # option12 go NiFT # option13 go NiFT # option14 go NiFT # option15 go NiFT # option16 go NiFT # option17 go NiFT # option18 go NiFT # option19 go NiFT # option20 go NiFT # end tr $clear