diff options
-rw-r--r-- | menu.bmx | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -31,20 +31,24 @@ Type TMenu list.AddLast(TMenuOpt.Create(x,y,i,id)) End Method - ' Returns the selected item, or -1 for none. Err, so don't use -1 as an ID. + ' Returns the selected item, or -1 for none. Err, so don't use -1 as an ID. Set hide to remove the buttons. ' - Method Render:Int() - Local in:Int=-1 - Local mx:Int=MouseX() - Local my:Int=MouseY() - Local any:Int=False - + Method Render:Int(hide:Int) SetAlpha(0.5) For Local p:TMenuBdrop=EachIn bdrop p.Update() Next SetAlpha(1) + If hide + Return -1 + EndIf + + Local in:Int=-1 + Local mx:Int=MouseX() + Local my:Int=MouseY() + Local any:Int=False + For Local opt:TMenuOpt=EachIn list If opt.InBox(mx,my) SetColor(255,255,255) @@ -70,7 +74,6 @@ Type TMenu mbdown=False EndIf - Return in End Method End Type |