Right so you have a module where you don’t have the code, you look it up at runtime, you find its params, you set the param quantity, the UI updates, all fine.
But you also want to deactivate drag messages on that item?
If I understand correctly I think you need to do four things
- Write a custom widget which calls
e.consume()
for all the events. Rack/include/widget/event.hpp at 8c6f41b778b4bf8860b89b36d5503fd37924077f · VCVRack/Rack · GitHub the surge code I linked above shows you the events I chose to capture when deactivate; you could consume those in yours - Create and position that widget over the widget which maps to the param quantity if you can find it. (Finding it isn’t super duper easy but BaconPlugs/src/LintBuddy.cpp at 67cc7d4a7132ed906b4c72ec2ea41340bf2fd13e · baconpaul/BaconPlugs · GitHub code plus some dynamic casting will get you there I bet
- Remove that widget once you are done with your change. Make sure it is in the right position in the Z Order
- But make sure to do all that widget manipulation from the UI thread not the DSP thread, so you also have a bit of process-starts-it-and-messages-ui-thread-to-block-it queue shenanigans going on
Help?