You can do that easily yourself by rewriting the appropriate method for whichever element you want. i.e:
Code:
--Load all the classes
GUI.New("mnu_mymenu", "Menubox", ...whatever the Menubox params are...)
function GUI.elms.mnu_mymenu:onmouseup()
-- Run the existing code for the menu
-- This could be after your extra code instead if you want
GUI.Menubox.onmouseup(self)
DoMyStuff(self.retval)
end
Or, if you need to do that with multiple elements, you can easily create a new class based on Menubox and rewrite the method for that:
Code:
-- Load all your libraries
GUI.MyMenuBox = GUI.Menubox
function GUI.MyMenuBox:onmouseup()
-- As above
end
See the example scripts for an, er, example of this in action. The code/formatting above might not be correct.