diff --git a/objects/menu.lua b/objects/menu.lua index 1b76b5f..609b894 100644 --- a/objects/menu.lua +++ b/objects/menu.lua @@ -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