home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a067 / 1.img / GRUMP501.EXE / KALEID.PRG < prev    next >
Encoding:
Text File  |  1991-04-23  |  1.3 KB  |  50 lines

  1. /*
  2.    Program: KALEID.PRG
  3.    System: GRUMPFISH LIBRARY
  4.    Author: Greg Lief
  5.    Copyright (c) 1988, Greg Lief
  6.    Clipper 5.x Version
  7.    Compile instructions: clipper kaleid /n/w/a
  8.  
  9.    Called by: REC_LOCK()
  10.             : FILELOCK()
  11.             : NET_USE()
  12.  
  13.    Draws a pretty kaleidoscope while the user
  14.    waits for the file/record to become available
  15. */
  16.  
  17. //───── begin preprocessor directives
  18.  
  19. #include "box.ch"
  20.  
  21. //───── end preprocessor directives
  22.  
  23.  
  24. function Kaleid(firstloop, waitmsg)
  25. static box_no := 0, buffer, nleft, ;
  26.        colors_ := { 'W', 'N', 'BG', 'BR', 'R', 'GR', 'B', 'G'}
  27. box_no++
  28. if firstloop
  29.    waiton('waiting for ' + waitmsg + '... press Esc to abort wait')
  30.    nleft := int(37 - len(waitmsg)) / 2
  31.    buffer := savescreen(11, nleft, 13, nleft + 43 + len(waitmsg))
  32. else
  33.    @ 12 - box_no, nleft - box_no + 1, 12 + box_no, ;
  34.        nleft + 43 + len(waitmsg) + box_no - 1 box B_SINGLE ;
  35.        color '+w/' + colors_[int((seconds() - int(seconds())) * 8) + 1]
  36.    inkey(.1)
  37.    if box_no == 11
  38.       box_no := 1
  39.       setcolor('w/n')
  40.       cls
  41.       restscreen(11, nleft, 13, nleft + 43 + len(waitmsg), buffer)
  42.    endif
  43. endif
  44. return NIL
  45.  
  46. * end function Kaleid()
  47. *--------------------------------------------------------------------*
  48.  
  49. * eof kaleid.prg
  50.