& pause ! NiFT.V 6** FREE SCRIPT **0 ! The /<-rAd Menu Script, released under GNU Public License ! Featuring Scrollable Menu Bar, Easy Configuration, and *Source Code* ! ! By: Christopher Heschong (CtG) This Script is ! ctg@wiw.org Internet UNDER 200 ! 1@ 1615004 VirtualNET Lines! ! 1@ 61501 The Collective ! ! 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. ! ! 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: 08-18-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 ! 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 $numoptions = 4 ! Number of Options $barcolor = "K" ! Color of Menu Bars $backcolor = "U" ! Color of Menu Background $option1 = "Page SysOp" ! The actual options $option2 = "Send Feedback" $option3 = "Log Off" $option4 = "Return to BBS" ! þþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþ jc $option1 $barwidth jc $option2 $barwidth jc $option3 $barwidth jc $option4 $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 $barpos = 3 $hidden = $startx + $barwidth - 2 $winbottomy = $starty + $bottom + 2 $winbottomx = $startx + $barwidth -1 # NiFT call box ! Display the Options $tmpx = $startx $tmpy = $starty call dnln tr $backcolor $option1 call dnln tr $backcolor $option2 call dnln tr $backcolor $option3 call dnln tr $backcolor $option4 # getkey $clr = $barcolor call putbar rc $key if $key = $escape rc $key ts $bs rc $key endif ts $bs test $key = $up up test $key = 8 up test $key = "A" up test $key = $down down test $key = 2 down test $key = "B" down test $key = "|" log ! Now go to the Neat Stuff if $key = $cr test $barpos = 1 page test $barpos = 2 feed test $barpos = 3 log test $barpos = 4 end endif go getkey ! Here are the Neat Stuff Routines: # page tr $clear pagesysop call pause go NiFT # feed tr $clear feedback go NiFT # log tr $clear logoff ! Draw the Box Around your Stuff # box tr $clear suspendpagebreak ef $background $tmpy = $starty $tmpx = $startx - 2 loc $tmpy $tmpx tr "UÉÍÍÍ6 Log Off Options UÍÍÍ»" call dnln tr "Uº Uº" call dnln tr "Uº Uº" call dnln tr "Uº Uº" call dnln tr "Uº Uº" call dnln tr "UÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍU¹" call dnln tr "Uº6 NiFT - Cool, Huh? Uº Uº" call dnln tr "UÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊͼU" resumepagebreak ret # dnln $tmpy = $tmpy + 1 loc $tmpy $tmpx ret ! Bar Movement Procedures # 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 loc $winbottomy $winbottomx ret # end tr $clear