Rack development blog

Added LEDLightSlider to componentlibrary.hpp. Example:

addParam(createLightParamCentered<LEDLightSlider<GreenLight>>(
	mm2px(Vec(40.0, 40.0), module,
	VCMixer::LVL_PARAM, VCMixer::LVL_LIGHT));

Also note my use of C++ CRTP for adding appearance traits and behavioral properties to widgets. 2019-09-26-110203_348x363_scrot

Also added segment light. Example:

// In `Module`:
enum LightIds {
	ENUMS(SEGMENT_LIGHTS, 10),
	NUM_LIGHTS
};
// In `ModuleWidget()`:
SegmentDisplay* segmentDisplay = createWidget<SegmentDisplay>(mm2px(Vec(2.424, 15.564)));
segmentDisplay->box.size = mm2px(Vec(25.984, 4.524));
segmentDisplay->setLights<WhiteLight>(module, Permutation6::SEGMENT_LIGHTS, 10);
addChild(segmentDisplay);

2019-09-26-110230_396x237_scrot

8 Likes