' ' Provides simple menus ' ' $Id$ ' Import noddybox.bitmapfont Type TMenu Field list:TList Field img:TImage Field font:TBitmapFont Field ypos:Int Field xpos:Int Field yoff:Int Field w:Int Field h:Int Field count:Int Field mbdown:Int Function Create:TMenu(f:TBitmapFont, img:TImage, y:Int) Local menu:TMenu=New TMenu menu.list=New TList menu.img=img menu.font=f menu.ypos=y menu.w=ImageWidth(img) menu.h=ImageHeight(img) menu.xpos=GraphicsWidth()/2-menu.w/2 menu.yoff=menu.h/2-f.TextHeight("X")/2 menu.mbdown=False Return menu End Function Method Add(s:String) list.AddLast(s) End Method ' Returns the selected item, or "" for none ' Method Render:String() Local y:Int=ypos Local in:String="" Local mx:Int=MouseX() Local my:Int=MouseY() Local any:Int=False For Local s:String=EachIn list If (mx>xpos And mxy And my