diff --git a/include/componentlibrary.hpp b/include/componentlibrary.hpp index 63dffd80..750551f7 100644 --- a/include/componentlibrary.hpp +++ b/include/componentlibrary.hpp @@ -886,23 +886,26 @@ struct VCVLatch : VCVButton { } }; -/** Looks best with MediumSimpleLight or a color of your choice. -*/ -template -struct VCVLightButton : VCVButton { +template +struct LightButton : TBase { app::ModuleLightWidget* light; - VCVLightButton() { + LightButton() { light = new TLight; // Move center of light to center of box - light->box.pos = box.size.div(2).minus(light->box.size.div(2)); - addChild(light); + light->box.pos = this->box.size.div(2).minus(light->box.size.div(2)); + this->addChild(light); } app::ModuleLightWidget* getLight() { return light; } }; + +template +using VCVLightButton = LightButton; + +/** Deprecated alias */ template using LEDLightButton = VCVLightButton;