computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit 65c2f16564c96bf2f8ac34589435c116f2ba3c5c
parent a1a26e7f4c2b167c406cf48ac4c90d0728c26f1a
Author: Adam M <[email protected]>
Date:   Sat, 16 Oct 2021 10:57:09 -0500

church up some knobs

Diffstat:
Msrc/ComputerscarePolyModule.hpp | 7++++---
Msrc/ComputerscareRolyPouter.cpp | 8+++++---
2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/ComputerscarePolyModule.hpp b/src/ComputerscarePolyModule.hpp @@ -25,18 +25,19 @@ struct ComputerscarePolyModule : Module { virtual void checkPoly() {}; }; -struct TinyChannelsSnapKnob: RoundBlackSnapKnob { +struct TinyChannelsSnapKnob: RoundKnob { std::shared_ptr<Svg> manualChannelsSetSvg = APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-channels-empty-knob.svg")); std::shared_ptr<Svg> autoChannelsSvg = APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-channels-empty-knob-auto-mode.svg")); int prevSetting = -1; int paramId = -1; - ComputerscarePolyModule *module; TinyChannelsSnapKnob() { setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-channels-empty-knob.svg"))); shadow->opacity = 0.f; + snap = true; + RoundKnob(); } void draw(const DrawArgs& args) override { if (module) { @@ -48,7 +49,7 @@ struct TinyChannelsSnapKnob: RoundBlackSnapKnob { } else { } - RoundBlackSnapKnob::draw(args); + RoundKnob::draw(args); } }; diff --git a/src/ComputerscareRolyPouter.cpp b/src/ComputerscareRolyPouter.cpp @@ -165,7 +165,7 @@ struct PouterSmallDisplay : SmallLetterDisplay SmallLetterDisplay::draw(args); } }; -struct DisableableSnapKnob : RoundBlackSnapKnob { +struct DisableableSnapKnob : RoundKnob { ComputerscarePolyModule *module; int channel; bool disabled = false; @@ -174,7 +174,9 @@ struct DisableableSnapKnob : RoundBlackSnapKnob { std::shared_ptr<Svg> disabledSvg = APP->window->loadSvg(asset::plugin(pluginInstance, "res/computerscare-medium-knob-dot-indicator-disabled.svg")); DisableableSnapKnob() { - RoundBlackSnapKnob(); + snap = true; + shadow->opacity = 0.f; + RoundKnob(); } void step() override { if (module) { @@ -184,7 +186,7 @@ struct DisableableSnapKnob : RoundBlackSnapKnob { setSvg(disabled ? disabledSvg : enabledSvg); lastDisabled = disabled; } - RoundBlackSnapKnob::step(); + RoundKnob::step(); } }; struct ComputerscareRolyPouterWidget : ModuleWidget {