BogaudioModules

BogaudioModules for VCV Rack
Log | Files | Refs | README | LICENSE

commit 4e54bc3a48b7745587485ae6c966c6b82c1e6a3d
parent ca3c3be69aad697564013a9bbec086421bf7cc4c
Author: Matt Demanett <matt@demanett.net>
Date:   Sat, 13 Jul 2019 23:23:28 -0400

Make mute buttons in Mix4/etc midi mappable. #64

Diffstat:
Msrc/mixer.cpp | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mixer.cpp b/src/mixer.cpp @@ -85,6 +85,7 @@ SoloMuteButton::SoloMuteButton() { void SoloMuteButton::onButton(const event::Button& e) { if (!paramQuantity || !(e.action == GLFW_PRESS && (e.mods & RACK_MOD_MASK) == 0)) { + ParamWidget::onButton(e); return; } @@ -99,7 +100,11 @@ void SoloMuteButton::onButton(const event::Button& e) { paramQuantity->setValue(value > 0.5f ? 0.0f : 1.0f); } - e.consume(this); + if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { + e.consume(this); + } else { + ParamWidget::onButton(e); + } } void SoloMuteButton::onChange(const event::Change& e) {