home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
procedures
/
push.amos
/
push.amosSourceCode
Wrap
AMOS Source Code
|
1993-01-08
|
1KB
|
35 lines
' Push procedure V1.2
'
' This procedure should be used after procs "Draw" & "Set up"
'
' This procedure will draw you a box that has been pushed up
'
' X - Starting X coordinate
' Y - Starting Y coordinate
' X1 - Ending X coordinate
' Y1 - Ending Y coordinate
' MESSAGE$ - Words that will be centred on the box
' TIME - This is the time to delay after it's pushed.
' If TIME is negative then there will be no delay
'
' See example "Examples/Set Up,Draw,Push.Amos"
'
Procedure PUSH[X,Y,X1,Y1,MESSAGE$,TIME]
' Procedure written by Brett George
Ink 2 : Bar X,Y To X1,Y1
If MESSAGE$<>""
Ink 0 : Box X-1,Y-1 To X1+1,Y1+1
Ink 1 : Plot X-1,Y-1 : Plot X-1,Y1+1 : Plot X1+1,Y-1 : Plot X1+1,Y1+1
End If
Ink 5 : Draw X1,Y1 To X,Y1 : Draw X1,Y1-1 To X+1,Y1-1
Draw X1,Y1 To X1,Y : Draw X1-1,Y1-1 To X1-1,Y : Ink 4
Draw X,Y To X1,Y : Draw X,Y+1 To X1-1,Y+1 : Draw X,Y To X,Y1
Draw X+1,Y To X+1,Y1-1
If MESSAGE$<>""
_=((X+X1)/2-(Text Length(MESSAGE$))/2)-2 : Gr Writing 0 : Ink 4
Text _,(Y+Y1)/2+Text Base/2,MESSAGE$
Ink 0
Text _-1,((Y+Y1)/2+Text Base/2)-1,MESSAGE$
End If
If TIME>0 Then Wait TIME : _DRAW[X,Y,X1,Y1,-1,MESSAGE$] : Wait TIME
End Proc