Annoying!
X=
Y=
Width=
Length=
Rem set up the look at the correct position
sync on
load image "up.bmp",1
load image "mid.bmp",2
load image "down.bmp",3
load image "ok.bmp",4
load image "cancel.bmp",5
ink rgb(255,255,255),0
box x,y,x+width-17,y+47
paste image 1,x+(width-16),y
paste image 2,x+(width-16),y+16
paste image 3,x+(width-16),y+32
paste image 4,x,y+58
paste image 5,x+40,y+58
Rem look at the list
Dim list$(length)
load array "list",list$()
Rem print the list
out:
for a=1 to 3
ink rgb(255,255,255),0
box x,y,x+width-17,y+47
set cursor x,y+((a-1)*16)
if a+extra=pick then ink rgb(100,200,100),rgb(255,255,255) : print checklist string$(a+extra#) else ink 0,rgb(255,255,255) : print checklist string$(a+extra#)
next a
sync
return
Rem loop
do
if mouseclick()=1 then
mx=mousex()
my=mousey()
repeat
until mouseclick()=0
gosub click
endif
sync
loop
Rem Click
Click:
if mx>x and mx<x+width-17 and my>y and my<y+47
pick=(my/16)+1+extra
gosub out
endif
if mx>x+width-16 and mx<x+width and my>y and my<y+15 and extra>0
extra=extra-1
gosub out
endif
if mx>x+width-16 and mx<x+width and my>y+32 and my<y+47 and extra<lenght
extra=extra+1
gosub out
endif
if mx>x and mx<x+30 and my>y+58 and my<y+75 and pick>0
goto ending
endif
if mx>x+40 and mx<x+70 and my>y+58 and my<+75
pick=0
goto ending
endif
return
ending:
Images:
up 16x16 up arrow
mid 16x16 background tile
down 16x16 down arrow
ok 30x16 ok button
cancel 30x16 cancel button
Values:
use the first few lines to set where the list will be in your program. Recomended width is over 200. length is the length of the list.
List:
the list should be put into an array called 'list'
Any suport needed post or email
j@higgs0029.freeserve.co.uk