home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST328.PRG < prev    next >
Encoding:
Text File  |  1989-08-08  |  2.3 KB  |  84 lines

  1. *******************
  2.  
  3. FUNCTION Pan
  4.  
  5.    PARAMETERS _style
  6.  
  7.    * _style = 0 or no parameter = clear screen
  8.    * _stype = 6 fade from left to right
  9.    * _style = 4 fade from right to left
  10.    * _style = 8 fade from bottom to top
  11.    * _style = 2 fade from top to bottom
  12.  
  13.    _style = IF( TYPE("_style") != "N", 0, _style)
  14.    IF TYPE("_style") != "N"
  15.       RETURN(.F.)
  16.    ENDIF
  17.  
  18.    IF TYPE("allwindows") != "A" .OR. TYPE("scr_level") != "N"
  19.       _clr1 = -1
  20.       _clr2 = -1
  21.       _clr3 = 25
  22.       _clr4 = 80
  23.    ELSE
  24.       IF scr_level - 1 < 1
  25.          _clr1 = -1
  26.          _clr2 = -1
  27.          _clr3 = 25
  28.          _clr4 = 80
  29.       ELSE
  30.          _clr1 = VAL(SUBSTR(allwindows[scr_level - 1], 1,  2))
  31.          _clr2 = VAL(SUBSTR(allwindows[scr_level - 1], 4,  2))
  32.          _clr3 = VAL(SUBSTR(allwindows[scr_level - 1], 7,  2))
  33.          _clr4 = VAL(SUBSTR(allwindows[scr_level - 1], 10, 2))
  34.       ENDIF
  35.    ENDIF
  36.  
  37.    IF _clr3 <= _clr1
  38.       _clr1 = -1
  39.       _clr2 = -1
  40.       _clr3 = 25
  41.       _clr4 = 80
  42.    ENDIF
  43.  
  44.    IF     _style = 4
  45.       _times = ((_clr4-1) - (_clr2+1))
  46.       FOR _qaz = 1 TO _times
  47.          RESTSCREEN(_clr1 + 1, _clr2 + 1, _clr3 - 1, _clr4 - 2, SAVESCREEN(_clr1 + 1, _clr2 + 2, _clr3 - 1, _clr4 - 1))
  48.          SCROLL(_clr1 + 1, _clr4 - 1, _clr3 - 1, _clr4 - 1, 0)
  49.          _clr4 = _clr4 - 1
  50.          INKEY(.01)
  51.       NEXT
  52.  
  53.    ELSEIF _style = 6
  54.       * take the bottom right coordinates, increment by one every
  55.       * time and move to the right.  Re-adjust the top left coordinate
  56.       * and repeate, blanking out the strip on the left.
  57.  
  58.       _times = ((_clr4-1) - (_clr2+1))
  59.       FOR _qaz = 1 TO _times
  60.          RESTSCREEN(_clr1 + 1, _clr2 + 2, _clr3 - 1, _clr4 - 1, SAVESCREEN(_clr1 + 1, _clr2 + 1, _clr3 - 1, _clr4 - 2))
  61.          SCROLL(_clr1 + 1, _clr2 + 1, _clr3 - 1, _clr2 + 1, 0)
  62.          _clr2 = _clr2 + 1
  63.          INKEY(.01)
  64.       NEXT
  65.  
  66.    ELSEIF _style = 2
  67.       FOR _qaz = _clr1 + 1 TO _clr3 - 1
  68.          SCROLL(_clr1 + 1, _clr2 + 1, _clr3 - 1, _clr4 - 1,-1)
  69.          INKEY(.01)
  70.       NEXT
  71.    ELSEIF _style = 8
  72.       FOR _qaz = _clr1 + 1 TO _clr3 - 1
  73.          SCROLL(_clr1 + 1, _clr2 + 1, _clr3 - 1, _clr4 - 1,1)
  74.          INKEY(.01)
  75.       NEXT
  76.    ELSE
  77.       SCROLL(_clr1 + 1, _clr2 + 1, _clr3 - 1, _clr4 - 1,0)
  78.    ENDIF
  79.    RETURN(.T.)
  80.  
  81. * End of File
  82.  
  83.  
  84.