Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - box3d() display 3d-like box http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 box3d()             Display 3D-like box
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   proc box3d extern
   param value uint uTop, ;
         value uint uLeft, ;
         value uint uBottom, ;
         value uint uRight, ;
         value uint uAttributes, ;
         value uint uHeader, ;
         value byte uColor

 Arguments
   uTop is the top row for box display.

   uLeft is the left column for box display.

   uBottom is the bottom row for box display.

   uRight is the right column for box display.

   uAttributes is the box attributes.

   uHeader is the number of box header lines.

   uColor is the color of the box. The 3D-effect is drawn with
   the background of this color, with black used as the foreground.

 Return
   None.

 Description
   The box3d() procedure displays a box with 3D-like effects. The
   appearance of the box is adjusted by the uAttributes parameter, using
   the following macro constants:

   B3D_NONE                             // no frame
   B3D_THICK                            // thick frame
   B3D_DOUBLE                           // double frame
   B3D_MIXED                            // single/double frame
   B3D_SINGLE                           // single frame
   B3D_NO3D                             // no 3D
   B3D_FRAME                            // internal frame
   B3D_SHADOW                           // shadow
   B3D_HEADER                           // header

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc DisplayBox
   para value uint nStyle, value uint uHeader, const char cMsg
   box3d( 7, 13, 17, 68, nStyle, uHeader, WHITE_WHITE )
   dispcolor( 9, 33, cMsg, WHITE_BLUE )
   getkey()
   endproc
   
   proc Test_box3d
   vardef
      uint nStyle
   enddef
   box( 0, 0, 24, 79, replicate( chr( 176 ), 9 ), BLUE_WHITE )
   @ 2, 30 ?? "The box3d() function "
   nStyle := B3D_NONE
   DisplayBox( nStyle, 0, "No frame" )
   nStyle := B3D_SINGLE + B3D_NO3D
   DisplayBox( nStyle, 1, "Single frame, no 3D" )
   nStyle -= B3D_NO3D
   DisplayBox( nStyle, 0, "Single frame" )
   nStyle := B3D_MIXED
   DisplayBox( nStyle, 0, "Mixed frame" )
   nStyle := B3D_DOUBLE
   DisplayBox( nStyle, 0, "Double frame" )
   nStyle := B3D_THICK
   DisplayBox( nStyle, 0, "Thick frame" )
   nStyle += B3D_FRAME
   DisplayBox( nStyle, 0, "Internal frame" )
   nStyle += B3D_HEADER
   DisplayBox( nStyle, 1, "Header" )
   nStyle += B3D_SHADOW
   DisplayBox( nStyle, 5, "Big header, shadow" )
   endproc

   proc main
   Test_box3d()
   endproc

See Also: popbox()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson