Hey
I was wondering if there is such a thing in VCV, like the light latch, for example the MediumLight function, but instead of drawing the light with code, it loads SVG images?
That would be a bit like the VCVLightLatch button, which uses SVG’s, but without the button function itself, you can only send it data, it doesn’t have a button function itself.
I did a switch, like this, which makes me able to get different colors for my switch, depending on it’s state. 0 has one color, 1 has another color, 2 has another color, etc. It works great.
struct SwitchLED1 : SvgSwitch {
SwitchLED1() {
addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/LED/LED-0.svg")));
addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/LED/LED-1.svg")));
addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/LED/LED-2.svg")));
addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/LED/LED-3.svg")));
addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/LED/LED-4.svg")));
} // B0 B1
};
I load this switch UI like this:
addParam(createParamCentered<Switch1>(mm2px(Vec( 100, 100)), module, PhaseSeq4::MUTE_PARAM));
But I’d like to turn it into what I described above, a kind of light switch that only can receives values and doesn’t have any button functionality itself, that loads SVG’s instead of drawing the values.
Are there any examples of this?
Thanks