-- Called when a component needs repainting
-- @comp
-- @g http://ctrlr.org/api/class_ctrlr_lua_graphics.html
-- see also http://www.rawmaterialsoftware.com/juce/api/classGraphics.html
--
paintclass = function(comp,g)
clval = comp:getOwner():getValue()
g:setColour(Colour(0x40000000))
g:fillRoundedRectangle(11,13,clval,69,4)
end
I’ve added modulatorValue property
-- Called when a mouse DOWN (any mouse button) event happens on a component
-- @comp
-- @event http://www.rawmaterialsoftware.com/juce/api/classMouseEvent.html
--
createclassval = function(comp, event)
classX = event.x
classY = event.y
if classX <= 127 then
comp:getOwner():setModulatorValue(classX,false,true,false)
comp:repaint()
end
end
--
-- Called when a modulator value changes
-- @mod http://ctrlr.org/api/class_ctrlr_modulator.html
-- @value new numeric value of the modulator
--
mod2paint = function(mod, value)
mod:getComponent():repaint()
end
I’ve linked a modulator to the custom comp and it sends the sysex
when I move this modulator
but when I click on the cusom component it doesn’t send the sysex
A property I missed ?