home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / various / push.amos / push.amosSourceCode
AMOS Source Code  |  1993-01-08  |  1KB  |  29 lines

  1. ' This procedure should be used after procs "Draw" & "Set up"  
  2. ' This procedure will draw you a box that has been pushed up 
  3. ' X        - Starting X coordinate   
  4. ' Y        - Starting Y coordinate   
  5. ' X1       - Ending X coordinate     
  6. ' Y1       - Ending Y coordinate   
  7. ' MESSAGE$ - Words that will be centred on the box   
  8. ' TIME     - This is the time to delay after it's pushed.  
  9. '           If TIME is negative then there will be no delay
  10. ' See example "Examples/Set Up,Draw,Push.Amos" 
  11. Procedure PUSH[X,Y,X1,Y1,MESSAGE$,TIME]
  12.    ' Procedure written by Brett George
  13.    Ink 2 : Bar X,Y To X1,Y1
  14.    If MESSAGE$<>""
  15.       Ink 0 : Box X-1,Y-1 To X1+1,Y1+1
  16.       Ink 1 : Plot X-1,Y-1 : Plot X-1,Y1+1 : Plot X1+1,Y-1 : Plot X1+1,Y1+1
  17.    End If 
  18.    Ink 5 : Draw X1,Y1 To X,Y1 : Draw X1,Y1-1 To X+1,Y1-1
  19.    Draw X1,Y1 To X1,Y : Draw X1-1,Y1-1 To X1-1,Y : Ink 4
  20.    Draw X,Y To X1,Y : Draw X,Y+1 To X1-1,Y+1 : Draw X,Y To X,Y1
  21.    Draw X+1,Y To X+1,Y1-1
  22.    If MESSAGE$<>""
  23.       _=((X+X1)/2-(Text Length(MESSAGE$))/2)-2 : Gr Writing 0 : Ink 4
  24.       Text _,(Y+Y1)/2+Text Base/2,MESSAGE$
  25.        Ink 0
  26.       Text _-1,((Y+Y1)/2+Text Base/2)-1,MESSAGE$
  27.    End If 
  28.    If TIME>0 Then Wait TIME : _DRAW[X,Y,X1,Y1,-1,MESSAGE$] : Wait TIME
  29. End Proc