home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
451-475
/
apd465
/
procedures
/
general_selector.amos
/
general_selector.amosSourceCode
Wrap
AMOS Source Code
|
1993-01-08
|
3KB
|
90 lines
' General Selector V1.0
'
' This procedure will allow the user to select any words of your choice
'
' Type$ - This is what the user will be asked to select
' TF - This is the number of records in the array f$
'
' Procedure must be used with procs "Draw" & "Push"
'
' Please see example -":Procedures/Examples/General_Selector.Amos"
'
'
'
Procedure GSEL_[TYPE$,TF]
' Procedure written by Brett George
Auto View Off : Menu Off
Shared F$()
For Z=0 To TF
If F$(Z)="" Then F$(Z)="�" Else Inc NO_OF_FILES
Next
Screen Open 4,512,125,8,Hires
Flash Off : Curs Off
Palette 0,$888,$777,$BBB,$444,$AAA : Cls 0
_DRAW[90,10,484,124,-1,""] : PUSH[122,25,464,114,"",0]
PUSH[96,36,116,98,"",0] : Ink 0
_DRAW[95,20,117,34,-1,""] : _DRAW[95,100,117,114,-1,""]
_DRAW[98,37,114,97,-1,""]
Reserve Zone 12 : Sort F$(0)
_DRAW[95,20,117,33,1,""] : _DRAW[95,100,117,114,2,""]
Polygon 105,31 To 105,27 To 102,27 To 106,23 To 110,27 To 107,27 To 107,31
Get Block 1,101,22,16,10,0 : Get Block 2,101,22,16,10,0 : Vrev Block 2
Put Block 1 : Put Block 2,100,103 : ZB=0 : POS=0 : Wait Vbl
Paper 2 : Pen 0
Locate ,2 : Centre "Please select a "+TYPE$
If NO_OF_FILES=<10
For FP=3 To 2+NO_OF_FILES
If F$(FP-3)<>"�"
Print At(16,FP+1)+Space$(40)
Print At(16,FP+1)+Zone$(F$(FP-3),FP)
End If
Next
Else
For FP=3 To 12
If F$(FP-3)<>"�"
Print At(16,FP+1)+Space$(40)
Print At(16,FP+1)+Zone$(F$(FP-3),FP)
End If
Next
End If
For Z=0 To 70
Screen Display Screen,,150-Z,,Z*2 : View : Wait Vbl
Next
Repeat
While Mouse Key=1
If Mouse Zone=1 and POS>0
If ZB=0
ZB=2 : PUSH[95,20,117,34,"",0] : Put Block 1
End If
Dec POS
For FP=3 To 12
Print At(16,FP+1)+Space$(40)
Print At(16,FP+1)+Zone$(F$(FP-3+POS),FP)
Next
End If
If Mouse Zone=2 and POS+10<NO_OF_FILES
If ZB=0
ZB=1 : PUSH[95,100,117,114,"",0] : Put Block 2,100,103
End If
Inc POS
For FP=3 To 12
Print At(16,FP+1)+Space$(40)
Print At(16,FP+1)+Zone$(F$(FP-3+POS),FP)
Next
End If
If ZB=1 Then _DRAW[95,100,117,114,-1,""] : Put Block 2,100,103 : ZB=0
If ZB=2 Then _DRAW[95,20,117,34,-1,""] : Put Block 1 : ZB=0
For Z=3 To NO_OF_FILES+2
If Mouse Zone=Z
RET$=F$(Z-3+POS) : Exit 3
End If
Next
Wend
Until Mouse Key=2
Curs Off : Reserve Zone : Del Block : ZB=0
For GO=70 To 0 Step True
Screen Display Screen,,150-GO,,GO*2 : View : Wait Vbl
Next
Limit Mouse 128,42 To 447,298+(-Ntsc*55) : Screen Close Screen
Auto View On : POS=0
End Proc[RET$]