#define X 50
#define Y 50
#define WIDTH 100
#define HEIGHT 40
screen.resolution.set (512,384)
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)
screen.set (FRONT)
text.display ("Press a key to set the persistence of the menulist.",CENTER,10)
text.color.stack (COLOR_RED)
text.display ("Press ESCAPE to exit.",CENTER,350)
screen.end ()
repeat ()
!angle+=1.5
menulist.position.set (@list,220+80*number.sin.get (!angle),150+80*number.cos.get (!angle))
time.wait (0.005)
until (keyboard.get ()==KEY_ESCAPE)
script.stop ()
procedure menu.manager (@event,%status,%item)
%i+=1
switch (%i mod 3)
case (0)
picture.persistence.set (@list,OFF)
case (1)
picture.persistence.set (@list,ON)
case (2)
picture.persistence.set (@list,PERSISTENCE_TRAILS)
end switch ()
screen.set (FRONT)
switch (picture.persistence.get (@list))
case (OFF)
text.display ("The persistence of the picture is : OFF ",CENTER,30)
case (ON)
text.display ("The persistence of the picture is : ON ",CENTER,30)
case (PERSISTENCE_TRAILS)
text.display ("The persistence of the picture is : TRAILS",CENTER,30)
end switch ()
screen.end ()
end procedure