home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
procedures
/
_zone_menu.amos
/
_zone_menu.amosSourceCode
Wrap
AMOS Source Code
|
1994-04-26
|
2KB
|
109 lines
Dim ME$(4),LINE$(4),BUTTON$(4),ZYCLUS(2)
STDSCREEN
ME$(0)="My Menu"
For X=1 To 4
ME$(X)="Menu"+Str$(X)
Next
MYMEN[4]
Cls
Print "Your choice was";Param
Wait 50
Procedure MYMEN[ANZ]
Reserve Zone ANZ
Shared ME$()
Reset Zone
BREITE=Screen Width/8
Locate 1,3 : Under On : Centre ME$(0) : Under Off
BLEN=0
For X=1 To ANZ
ALEN=Len(ME$(X)) : BLEN=Max(BLEN,ALEN)
Next
For X=1 To ANZ
ME$(X)= Extension_22_011A(ME$(X),BLEN,0)
Next
Inverse On : Show : Curs Off
Wait 10
LL=2*BLEN+4
L1=(BREITE-LL)/2
L2=L1+4+BLEN
P=4
ANZ1=ANZ/2
If ANZ/2*2<ANZ Then ANZ1=ANZ1+1
For X=1 To ANZ1
P=P+2
Box L1*8-1,P*8-1 To L1*8+BLEN*8,P*8+8
Set Zone X,L1*8-1,P*8-1 To L1*8+BLEN*8,P*8+8
Locate L1,P
Print ME$(X)
Next
P=4
For X=ANZ1+1 To ANZ
P=P+2
Box L2*8-1,P*8-1 To L2*8+BLEN*8,P*8+8
Set Zone X,L2*8-1,P*8-1 To L2*8+BLEN*8,P*8+8
Locate L2,P
If ME$(X)<>"" Then Print ME$(X)
Next
GMEN:
IN=Mouse Zone
If Mouse Key=1 and IN>0 and IN=<ANZ Then Goto GO
Goto GMEN
GO:
LL=2*BLEN+4
L1=(BREITE-LL)/2
L2=L1+4+BLEN
P=4
ANZ1=ANZ/2
If ANZ/2*2<ANZ Then ANZ1=ANZ1+1
For X=1 To ANZ1
P=P+2
Locate L1,P
If IN=X Then Inverse Off
Print ME$(X)
If IN=X Then Inverse On
Next
P=4
For X=ANZ1+1 To ANZ
P=P+2
Locate L2,P
If IN=X Then Inverse Off
If ME$(X)<>"" Then Print ME$(X)
If IN=X Then Inverse On
Next
While Mouse Key=1 : Wend
LL=2*BLEN+4
L1=(BREITE-LL)/2
L2=L1+4+BLEN
P=4
ANZ1=ANZ/2
If ANZ/2*2<ANZ Then ANZ1=ANZ1+1
For X=1 To ANZ1
P=P+2
Locate L1,P
Print ME$(X)
Next
P=4
For X=ANZ1+1 To ANZ
P=P+2
Locate L2,P
If ME$(X)<>"" Then Print ME$(X)
Next
Hide
Inverse Off
End Proc[IN]
Procedure STDSCREEN
Default
Close Editor
Close Workbench
Screen Open 0,680,257,4,Hires
Screen Offset 0,0,0
Limit Mouse 112,42 To 447,298
Curs Off : Flash Off
Colour 0,0 : Colour 1,$90 : Colour 2,$8F8 : Colour 3,$E0 : Rem Gruen
' Colour 0,0 : Colour 1,$555 : Colour 2,$EEE : Colour 3,$AAA : Rem Grau
RES_SCREEN[0]
End Proc
Procedure RES_SCREEN[X]
Gr Writing 1 : Ink 2,1 : Pen 2 : Paper 1
If X=0 Then Cls
End Proc