home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / COLRMENU.ZIP / COLORT.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1989-09-25  |  1.7 KB  |  45 lines

  1. {*****************************************************************************}
  2. {* Author : Andrew Phillips                                                  *}
  3. {* Date   : 9-25-1989                                                        *}
  4. {*                                                                           *}
  5. {* Program: COLORT.PAS   An example program implementing the COLORS.TPU unit *}
  6. {*****************************************************************************}
  7.  
  8. PROGRAM Test_Menu_Colors;
  9.  
  10. USES
  11.     Colors;
  12.  
  13. CONST
  14.     UseExplode = True;  {Make menu explode when opened, implode when closed.  } 
  15.     UseSound   = True;  {Make noise while exploding and imploding.            }
  16.     UseShadow  = True;  {Put a shadow underneath menu to simulate 3-D.        }
  17.  
  18. VAR
  19.     Color  : byte;      {Upon exit this contains the attribute selected.      }
  20.     Change : boolean;   {This indicates if the change was entered or aborted. }
  21.     Row    : byte;      {This is the top left Y coordinate for menu           }
  22.     Column : byte;      {This is the top left X coordinate for menu           }
  23.  
  24. BEGIN
  25.  
  26.     Row    :=  4;       {First row of menu}
  27.     Column := 35;       {First column of menu}
  28.                         {If Row and Column would put menu past bottom right
  29.                          corner of screen, they will be forced to (1,1)       }
  30.  
  31.     ColorMenu(
  32.          Row,Column,                                     
  33.          UseExplode,UseSound,UseShadow,     
  34.          Color,                            
  35.          Change
  36.              );
  37.  
  38.     IF Change THEN
  39.          writeln ('Color Selected: ',Color)
  40.     ELSE
  41.          writeln ('No Color Change');
  42.  
  43.  
  44. END.
  45.