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 - __color_std standard color attribute http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __color_std         Standard color attribute
------------------------------------------------------------------------------
 Declaration
   color.hdr

 Syntax
   byte __color_std

 Default
   BLACK_LIGHT_GREY.

 Description
   The __color_std system variable is a label for the
   __syscolor[ CLR_STD ] system array element.

   The variable determines the standard attribute for screen output.
   Changing the contents of this variable makes it easy to modify the
   attribute of the screen output.

   Modifying the contents of __color_std is faster, and it
   requires less code than using the standard dBase command
   set color to. Saving the contents of __color_std into a temporary
   variable makes it easy to later restore the original color value.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   // Save the current standard attribute, output a message using a different
   // color, and then restore the original attribute afterwards
   
   proc Test_color_std
   vardef
      byte bColor
   enddef
   bColor := __color_std
   __color_std := RED_WHITE
   @ 10, 5 ?? " WARNING "              // this displays in white on red
   __color_std := bColor
                                       // this displays in standard color
   @ 12, 5 ?? "You better power down the computer"
   endproc

   proc main
   Test_color_std()
   endproc

See Also: __syscolor

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