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 - dispattr() print a string in mixed colors http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 dispattr()          Print a string in mixed colors
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   proc dispattr extern
   param value uint uRow, ;
         value uint uCol, ;
         const char cString, ;
         value uint uLength, ;
         value byte bColor

 Arguments
   uRow is the row position for the display.

   uCol is the column position for the display.

   cString is the string to print.

   nLength is the maximum display length.

   bColor is the initial display color.

 Return
   None.

 Description
   The dispattr() procedure prints a string at the specified screen
   location. The string is initially displayed in the color given by
   the bColor parameter. The color can be modified at any part of
   the string by using the '^' attribute marker character. Display
   color attributes are specified by the ASCII code of the character
   following the '^' marker. The length of display can be limited by the
   uLength parameter.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_dispattr
   clear
   dispattr( 5, 0, "The .Force [compiler???", 18, BLACK_LIGHT_GREY )
   endproc       //     ||      ||        +------ exceed display length
                 //     +------------------------ color attribute changes

   proc main
   Test_dispattr()
   endproc

See Also: ?? dispcolor() dispdirect()

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