View Single Post
Old 07-24-2017, 07:02 PM   #32
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

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.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote