home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / warning.prg < prev    next >
Text File  |  1993-10-14  |  2KB  |  85 lines

  1. /*
  2.  * File......: WARNING.PRG
  3.  * Author....: Martin Colloby
  4.  * BBS.......: The Dark Knight Returns
  5.  * Net/Node..: 050/069
  6.  * User Name.: Martin Colloby
  7.  * Date......: 18/4/93
  8.  * Revision..: 1.0
  9.  *
  10.  * This is an original work by Martin Colloby and is placed in the public
  11.  * domain.
  12.  *
  13.  * Modification history:
  14.  * ---------------------
  15.  *
  16.  * $Log$
  17.  *
  18.  */
  19.  
  20.  
  21. /*  $DOC$
  22.  *  $FUNCNAME$
  23.  *      GT_WARNING()
  24.  *  $CATEGORY$
  25.  *      Video
  26.  *  $ONELINER$
  27.  *      Output a warning message in white on red
  28.  *  $SYNTAX$
  29.  *      GT_Warning( aText )
  30.  *  $ARGUMENTS$
  31.  *      aText - Array of text.  Each element will appear on a different line
  32.  *  $RETURNS$
  33.  *      NIL
  34.  *  $DESCRIPTION$
  35.  *      The text in aText is output in white on red, in a white on red box
  36.  *  $EXAMPLES$
  37.  *
  38.  *  $SEEALSO$
  39.  *
  40.  *  $INCLUDE$
  41.  *      GT_LIB.CH
  42.  *  $END$
  43.  */
  44.  
  45. *
  46. #include "GT_LIB.ch"
  47.  
  48. FUNCTION GT_Warning( aString )
  49.  
  50. /****************************************************************************
  51.  Purpose - Output a White on Red warning
  52.  Returns - None
  53.  Author  - Martin Colloby
  54.  Created - 22/8/91
  55. ******************************************************************************
  56.  Parameters - aString - Array containing string for warning message
  57.  Locals     - cScreen - Temporary storage for screen
  58.  Externals  - None
  59. ****************************************************************************/
  60.  
  61. LOCAL cScreen := GT_SaveScr( 0 , 0 , MAXROW() , MAXCOL() )
  62. LOCAL nCursor := SETCURSOR( 0 )
  63.  
  64. GT_ColorSet( C_BOLD )
  65. @ 0 , 0 SAY PADR( ""                          , MAXCOL() )
  66. @ 1 , 0 SAY PADR( "Press any key to continue" , MAXCOL() )
  67. GT_ColorSet( C_NORMAL )
  68.  
  69. * Output the string
  70. GT_BlatBox( aString , -1 , -1 , C_WARNING )
  71. GT_ColorSet( C_NORMAL )
  72.  
  73. * Output a warning beep
  74. GT_Beep()
  75. GT_Beep()
  76.  
  77. GT_GetKey()
  78.  
  79. GT_RestScr( cScreen )
  80.  
  81. SETCURSOR( nCursor )
  82.  
  83. RETURN NIL
  84. *
  85.