home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a013 / 1.ddi / SOURCE.EXE / F_SIGNON.PRG < prev    next >
Encoding:
Text File  |  1991-01-25  |  2.8 KB  |  108 lines

  1. *****************************************************************
  2. FUNCTION SIGNON(app_name1, app_name2, dev_name1, dev_name2, hold)
  3. *****************************************************************
  4.  
  5. * Draws imploding/exploding application "sign-on" screen
  6.  
  7. * Copyright(c) 1991 -- James Occhiogrosso
  8.  
  9. #include "setcurs.ch"
  10.  
  11. LOCAL top := 1, left := 1, bottom := 22, right := 78,  ;
  12.       keypress := 0, old_color := SETCOLOR(colstd),  ;
  13.       old_cursor := SETCURSOR(SC_NONE)
  14.  
  15.  
  16.  
  17. IF PCOUNT() < 4
  18.     RETURN NIL
  19. ENDIF
  20.  
  21. * Set hold screen flag to false if undefined
  22. hold = IF(hold == NIL, .F., hold)
  23.  
  24. CLEAR SCREEN
  25.  
  26. DO WHILE keypress = 0
  27.  
  28.      SETCOLOR(colbarlo)
  29.  
  30.      * Display application name
  31.      @ 8, 15 SAY PADC(IF(app_name1 != NIL, app_name1, ''), 50)
  32.      @ 9, 15 SAY PADC(IF(app_name2 != NIL, app_name2, ''), 50)
  33.  
  34.      SETCOLOR(colstd)
  35.      * Display the innermost boxed area
  36.      @ 10, 17 TO 15, 62
  37.  
  38.      * Display developers name
  39.      @ 11, 18 SAY PADC(IF(dev_name1 != NIL, dev_name1, ''), 44)
  40.      @ 12, 18 SAY PADC(IF(dev_name2 != NIL, dev_name2, ''), 44)
  41.  
  42.      * Display copyright notice
  43.      @ 13, 17 SAY '├────────────────────────────────────────────┤'
  44.      @ 14, 20 SAY 'Copyright (c) 1991 ─ All rights Reserved'
  45.  
  46.      * Change colors
  47.      SETCOLOR(colbarlo)
  48.  
  49.      * Draw double-line boxes inward
  50.      DO WHILE top <  8
  51.         @ top,left TO bottom,right DOUBLE
  52.         top++
  53.         bottom--
  54.         left = left + 2
  55.         right = right - 2
  56.      ENDDO
  57.  
  58.      * Wait for 1 second
  59.      PAUSE(1)
  60.  
  61.      * Reset row and column
  62.      top =   7                                  &&     top =   7
  63.      left = 14                                  &&     left = 14
  64.      bottom = 16                                &&     bottom = 16
  65.      right = 65                                 &&     right = 65
  66.  
  67.      * Draw double-line boxes outward, overlaying original
  68.      * lines at top and bottom of screen
  69.  
  70.      DO WHILE top > 0 .AND. right <= 79
  71.         @ top, left TO bottom, right DOUBLE
  72.         SETCOLOR(colbarhi)
  73.         top--
  74.         bottom++
  75.         left = left - 2
  76.         right = right + 2
  77.      ENDDO
  78.  
  79.      * Check "hold" flag. If true, clear screen and redisplay
  80.      * signon message every 2 seconds or until a key is pressed
  81.  
  82.      IF hold
  83.          * Put message on screen, and wait for a key
  84.          SETCOLOR(colstd)
  85.          CENTERON(24, hitanykey)
  86.          keypress = INKEY(2)
  87.  
  88.          IF keypress = 0
  89.              * Wait 2 seconds before looping
  90.              CLEAR SCREEN
  91.              PAUSE(2)
  92.          ENDIF
  93.  
  94.      ELSE
  95.          * No hold, so simulate key closure to display
  96.          keypress = 1
  97.          PAUSE(2)
  98.      ENDIF
  99.  
  100. ENDDO
  101.  
  102. * Restore entry conditions and return
  103.  
  104. SETCOLOR(old_color)
  105. SETCURSOR(old_cursor)
  106. RETURN NIL
  107.  
  108.