Re: Envelope.hmm (0.7) - supporting envelopes in NWC
Reply #12 –
You're very welcome.
BTW, this is not a big deal, but I noticed that when you bumped the version to 0.7, it still says 0.6 in the help comment section. You can fix that when you go to 0.8
Also, I saw this usage comment:
It's more of a "tear drop" but that is the standard icon for a user plugin. You've probably noticed that a number of other plugins show as sideways text with an oval around them. There's a "toolbox" for drawing that which you can use if you like; you should look at the source code for one of those objects to see how it's done (try Cueheads.ms as an example).
Basically you would add the following code:
-- Following line is outside any functions
local userObjSigName = nwc.toolbox.genSigName(userObjTypeName)
-- Following three lines are added to the top of the _draw hook
local isStaffSig = (t.Class == 'StaffSig')
local w = isStaffSig and nwc.toolbox.drawStaffSigLabel(userObjSigName) or 0
if not nwcdraw.isDrawing() then return w end
You could include additional information inside the oval, such as the name of the controller.
You would also need to add "width = _draw" to your return hooks.