#define X 50
#define Y 50
#define WIDTH 100
#define HEIGHT 40
screen.resolution.set (512,384)
@icon=icon.load ("avo\dinosaur.png")
icon.persistence.set (@icon,TRUE)
icon.display (@icon,50,50)
screen.set (BACK)
pattern.display ("avo\bubble.gif")
screen.end ()
menulist.color.select (COLOR_SILVER)
menulist.backcolor.select (COLOR_GRAY)
@list=menulist.create (WIDTH,HEIGHT,menu.manager)
menulist.item.add (@list,"Open")
menulist.item.add (@list,"Load")
menulist.item.add (@list,"Save")
menulist.item.add (@list,"Save as...")
menulist.item.add (@list,"Print")
menulist.item.add (@list,"Quit")
menulist.display (@list,X,Y)
text.display ("Press RETURN or click to swap the layers. Then press ESCAPE to exit.",CENTER,350)
keyboard.wait (KEY_ESCAPE)
script.stop ()
procedure menu.manager (@event,%status,%item)
if (%flag)
menulist.layer.set (@event,256)
else ()
menulist.layer.set (@event,1)
endif()
%flag^=TRUE
%data=menulist.layer.get (@list)
text.display (" The layer of the menulist is : " + STR (%data)+" ",CENTER,10)
end procedure