Add menu:RemoveOption

This commit is contained in:
Kenny Shields 2014-01-06 22:50:52 -05:00
parent d2b76b191d
commit ca26c83414

View File

@ -207,6 +207,21 @@ function newobject:AddOption(text, icon, func)
end
--[[---------------------------------------------------------
- func: RemoveOption(id)
- desc: removes an option
--]]---------------------------------------------------------
function newobject:RemoveOption(id)
for k, v in ipairs(self.internals) do
if k == id then
table.remove(self.internals, k)
return
end
end
end
--[[---------------------------------------------------------
- func: AddSubMenu(text, icon, menu)
- desc: adds a submenu to the object