home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
subroutines
/
request.amos
/
request.amosSourceCode
Wrap
AMOS Source Code
|
1990-11-08
|
1KB
|
34 lines
'
Flash Off : Curs Off
Reserve Zone 36
REQUEST[50,30,30,"Yes","No","exit ?"]
Print Param
'
'
'
'************************************************************
'* *
'* stzone=use two zones starting with this number *
'* pos$= positive button text : neg$= negative button text *
'* prompt$=message *
'* *
Procedure REQUEST[X,Y,STZONE,POS$,NEG$,PROMPT$]
' Returns 1 if positive answer else returns -1
Memorize X : Memorize Y
WIDTH=(Len(POS$)+Len(NEG$)+10)*8
WIDTH2=(Len(PROMPT$)+2)*8
WIDTH=Max(WIDTH,WIDTH2)
X=(X/8)*8 : Ink 0
Get Cblock 1,X,Y,X+WIDTH,Y+64
Bar X+1,Y+1 To X+WIDTH-1,Y+63
Print At(X Text(X+8),Y Text(Y+8))+PROMPT$
Print At(X Text(X+16),Y Text(Y+40))+Border$(Zone$(POS$,STZONE),1);
Print At(X Text((X+WIDTH)-(16+(Len(NEG$)*8))),Y Text(Y+40))+Border$(Zone$(NEG$,STZONE+1),1);
TESTZONE:
While Mouse Key=0 : Z=Mouse Zone : Wend
If Z=0 Then Goto TESTZONE
If Z=STZONE : Z=1 : Else Z=-1 : End If
Remember X : Remember Y
Put Cblock 1
End Proc[Z]
'************************************************************