sqr/saw leds work
This commit is contained in:
parent
1e1add37bb
commit
04446708c3
|
@ -110,6 +110,20 @@ DistrhoUIchassis::DistrhoUIchassis() : UI(Art::backgroundWidth, Art::backgroundH
|
|||
xBtn4ft->setAbsolutePos(231, 104);
|
||||
xBtn4ft->setId(btn4);
|
||||
xBtn4ft->setCallback(this);
|
||||
|
||||
xBtnPls = new ImageButton(this, Image(Art::orngBtnUp, Art::orngBtnWidth, Art::orngBtnHeight, kImageFormatRGBA),
|
||||
Image(Art::orngBtnDn, Art::orngBtnWidth, Art::orngBtnHeight, kImageFormatRGBA));
|
||||
xBtnPls->setAbsolutePos(414, 104);
|
||||
xBtnPls->setId(btnPls);
|
||||
xBtnPls->setCallback(this);
|
||||
xBtnSaw = new ImageButton(this, Image(Art::orngBtnUp, Art::orngBtnWidth, Art::orngBtnHeight, kImageFormatRGBA),
|
||||
Image(Art::orngBtnDn, Art::orngBtnWidth, Art::orngBtnHeight, kImageFormatRGBA));
|
||||
xBtnSaw->setAbsolutePos(455, 104);
|
||||
xBtnSaw->setId(btnSaw);
|
||||
xBtnSaw->setCallback(this);
|
||||
|
||||
|
||||
|
||||
programLoaded(0);
|
||||
}
|
||||
|
||||
|
@ -237,6 +251,12 @@ void DistrhoUIchassis::imageButtonClicked(ImageButton* imgBtn, int) {
|
|||
sw1 &= 0xf8;
|
||||
sw1 |= 0x04;
|
||||
break;
|
||||
case btnPls:
|
||||
sw1 ^= 0x08;
|
||||
break;
|
||||
case btnSaw:
|
||||
sw1 ^= 0x10;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -250,8 +270,8 @@ void DistrhoUIchassis::onDisplay() {
|
|||
if (sw1 & 0x01) fImgLedOn.drawAt(context, 160, 77); // 16'
|
||||
if (sw1 & 0x02) fImgLedOn.drawAt(context, 198, 77); // 8'
|
||||
if (sw1 & 0x04) fImgLedOn.drawAt(context, 238, 77); // 4'
|
||||
if (sw1 & 0x08) fImgLedOn.drawAt(context, 427, 77); // pulse
|
||||
if (sw1 & 0x10) fImgLedOn.drawAt(context, 465, 77); // saw
|
||||
if (sw1 & 0x08) fImgLedOn.drawAt(context, 424, 77); // pulse
|
||||
if (sw1 & 0x10) fImgLedOn.drawAt(context, 464, 77); // saw
|
||||
if ((sw1 & 0x60) == 0x40) fImgLedOn.drawAt(context, 612, 267); // chorus 1
|
||||
if ((sw1 & 0x60) == 0x00) fImgLedOn.drawAt(context, 652, 267); // chorus 2
|
||||
};
|
||||
|
|
|
@ -33,7 +33,7 @@ class DistrhoUIchassis : public UI,
|
|||
xSliderLFODepth, xSliderPWMDepth, xSliderSubLevel, xSliderNoiseLevel,
|
||||
xSliderHPF, xSliderCutoff, xSliderRes, xSliderEnv, xSliderLfo, xSliderKyb,
|
||||
xSliderVCALevel, xSliderAtk, xSliderDcy, xSliderStn, xSliderRls;
|
||||
ScopedPointer<ImageButton> xBtn16ft, xBtn8ft, xBtn4ft;
|
||||
ScopedPointer<ImageButton> xBtn16ft, xBtn8ft, xBtn4ft, xBtnPls, xBtnSaw;
|
||||
|
||||
uint8_t sw1 = 0, sw2 = 0;
|
||||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIchassis)
|
||||
|
|
Loading…
Reference in New Issue