Comment ========================================================== This include file exports definitions that creates hi-tech screen fade menu look and feel - a little differnt from the standard same color backgrounds. It is a simple modification of Marc Perkel's GRID.INC, only trying to get a really different look for your MarxMenus. You can change colors to get a different feel. by Tom Perry, registered Marx User... 3/95 ========================================================== EndComment var Grid1 = " u u ? ? ? ? ??? ???2???2?2?22?2U222222" Grid2 = " u u ? ???? ???2????2?2222?22222U22U" Grid3 = " u u ? ? ? ??? ?????2???2?2U2222U222UU" Grid4 = " u uu u ? ?? ???? 2???2?2222?U222U22U" Choices MenuTitle StatusLineText StatusWindow HeightDifference Greek = False var BackGroundFG BackGroundBG TitleBoxBorderFG TitleBoxBG TitleBoxInsideFG ClockColorFG StatusLineFG StatusLineBG MenuInsideFG MenuBG MenuHeaderFG MenuHeaderBG MenuBorderFG MenuInactiveFG MenuVertLinesFG MenuInverseFG MenuInverseBG MenuCapColorFG ConsoleInsideFG GreekFG GreekBG ;------ This is where you set your favorite colors. Procedure SetColors if ColorScreen BackGroundFG = Blue BackGroundBG = Black TitleBoxBG = Black TitleBoxBorderFG = Blue TitleBoxInsideFG = Red ClockColorFG = Red StatusLineFG = LBlue StatusLineBG = Black MenuBG = Black MenuInsideFG = LBlue MenuBorderFG = Cyan MenuInactiveFG = LBlue MenuHeaderFG = Red MenuHeaderBG = Black MenuVertLinesFG = LGreen MenuInverseFG = Yellow MenuInverseBG = Blue MenuCapColorFG = Mag ConsoleInsideFG = LBlue GreekFG = Black GreekBG = Brown else BackGroundFG = Grey BackGroundBG = Black TitleBoxBG = Grey TitleBoxBorderFG = Black TitleBoxInsideFG = Black ClockColorFG = Black StatusLineFG = Black StatusLineBG = Grey MenuBG = Black MenuInsideFG = Grey MenuBorderFG = White MenuInactiveFG = Grey MenuHeaderFG = Black MenuHeaderBG = Grey MenuVertLinesFG = White MenuInverseFG = Black MenuInverseBG = Grey MenuCapColorFG = White ConsoleInsideFG = Grey GreekFG = Black GreekBG = Grey endif EndProc ;------ Sets up main window to block look. Procedure LookSetup if MenuInsideFG = 0 then SetColors NoExit ;------ Clear the screen with a textured background if not Overlayed TextColor BackGroundFG BackGroundBG ClearScreen GotoXY 1 3 loop (ScreenHeight - 1)/4 Writeln Grid1 Writeln Grid2 Writeln Grid3 Writeln Grid4 endloop endif ;------ Draw Status Line NoBoxBorder InactiveBox NoBoxBorder Explode Off BoxInsideColor StatusLineFG StatusLineBG DrawBox 1 ScreenHeight ScreenWidth 1 StatusWindow = CurrentWindow WriteCenter(StatusLineText) if not Overlayed ;------ Draw the Title Box SingleLineBox BoxInsideColor TitleBoxInsideFG TitleBoxBG BoxBorderColor TitleBoxBorderFG TitleBoxBG DrawBox 1 1 ScreenWidth 3 GotoXY(ScreenWidth - Length(MenuTitle) - 3,1) Write MenuTitle ;------ Display the clock ClockColor ClockColorFG TitleBoxBG ClockPos 3 2 ;------ Setup Console ConsolePos 42 5 ConsoleHeaderColor MenuInverseFG MenuInverseBG ConsoleInsideColor ConsoleInsideFG MenuBG endif BoxHeaderColor MenuHeaderFG MenuHeaderBG HeightDifference = 2 ; SmallShadow ; Shadow EndProc Procedure MakeBox(Header,Col,Row,Center) var Height Width Cnt Width = Length(Header) - 1 ;Get the widest element in the Choices Array if Length(Choices[1]) > 0 Cnt = 65 loop Choices Trim(LoopVal) if left(LoopVal,1) <> 'A' LoopVal = " " + Char(Cnt) + ". " + LoopVal Cnt = Cnt + 1 endif Width = Max(Width,Length(LoopVal)) endloop else Width = ScreenWidth - 7 endif Height = NumberOfElements(Choices) + HeightDifference Width = Width + 5 if Center if Row = 0 ;Center window verticaly Row = ((ScreenHeight - Height) / 2) + 2 else ;Center window with X Coordinate Row = (Row - (Height / 2) + 1) endif if Col = 0 ;Center window horizonitly Col = (ScreenWidth - Width) / 2 + 1 else ;Center window with Y Coordinate Col = (Col - (Width / 2) + 1) endif endif ;Make Sure Row and Col are within their range Row = Max(Row,5) Row = Min(Row,ScreenHeight - Height - 1) Col = Max(Col,2) Col = Min(Col,ScreenWidth - Width) DrawTheBox(Col,Row,Width,Height,Header) ;Write the menu choices loop Choices if left(LoopVal,1) = 'A' TextColor MenuVertLinesFG MenuBG ClearLine 196 TextColor MenuInsideFG MenuBG CapsColor(MenuCapColorFG,MenuBG) Writeln else if LoopIndex = LoopLimit then Write(LoopVal) else Writeln(LoopVal) endif endloop UseArrows On Dispose(Choices) EndProc ;------ Draw the Box Procedure DrawTheBox (Col,Row,Width,Height,Header) ;Draw the main window DoubleLineBox InactiveBox SingleLineBox InactiveBoxColor MenuInactiveFG MenuBG BoxInsideColor MenuInsideFG MenuBG BoxBorderColor MenuBorderFG MenuBG if Header > '' then Header = ' ' + Header + ' ' BoxHeader = Header DrawBox(Col, Row, Width, Height) if Header > '' TextColor MenuInsideFG MenuBG CapsColor MenuCapColorFG MenuBG InverseColor MenuInverseFG MenuInverseBG Window(Col + 2,Row + 1,Width - 4,Height - HeightDifference) else CapsColor Black Black endif EndProc