diff options
author | Ian C <ianc@noddybox.co.uk> | 2005-10-05 00:12:15 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2005-10-05 00:12:15 +0000 |
commit | a110b1048456a50550f574c19d844d760a70dcbe (patch) | |
tree | 03ccb261b2e8836a8804b4982a85dba4bbde3ed1 | |
parent | 09de3cf13e2d46d2c6e3c1a89b42e22d159a3037 (diff) |
Added hide buttons option
-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 |