DistrhoUIPingPongPan::DistrhoUIPingPongPan() : UI(Art::backgroundWidth, Art::backgroundHeight), fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, GL_BGR), fAboutWindow(this) { // about Image imageAbout(Art::aboutData, Art::aboutWidth, Art::aboutHeight, GL_BGR); fAboutWindow.setImage(imageAbout); // knobs Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight); // knob Low-Mid fKnobFreq = new ImageKnob(this, knobImage, ImageKnob::Vertical); fKnobFreq->setId(DistrhoPluginPingPongPan::paramFreq); fKnobFreq->setAbsolutePos(60, 58); fKnobFreq->setRange(0.0f, 100.0f); fKnobFreq->setDefault(50.0f); fKnobFreq->setRotationAngle(270); fKnobFreq->setCallback(this); // knob Mid-High fKnobWidth = new ImageKnob(this, knobImage, ImageKnob::Vertical); fKnobWidth->setId(DistrhoPluginPingPongPan::paramWidth); fKnobWidth->setAbsolutePos(182, 58); fKnobWidth->setRange(0.0f, 100.0f); fKnobWidth->setDefault(75.0f); fKnobWidth->setRotationAngle(270); fKnobWidth->setCallback(this); // about button Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight); Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight); fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover); fButtonAbout->setAbsolutePos(183, 8); fButtonAbout->setCallback(this); // set default values programLoaded(0); }
START_NAMESPACE_DISTRHO // ------------------------------------------------- DistrhoUI3BandEQ::DistrhoUI3BandEQ() : OpenGLUI(), fAboutWindow(this) { // background fImgBackground = Image(DistrhoArtwork3BandEQ::backgroundData, DistrhoArtwork3BandEQ::backgroundWidth, DistrhoArtwork3BandEQ::backgroundHeight, GL_BGR); // about Image imageAbout(DistrhoArtwork3BandEQ::aboutData, DistrhoArtwork3BandEQ::aboutWidth, DistrhoArtwork3BandEQ::aboutHeight, GL_BGR); fAboutWindow.setImage(imageAbout); // sliders Image sliderImage(DistrhoArtwork3BandEQ::sliderData, DistrhoArtwork3BandEQ::sliderWidth, DistrhoArtwork3BandEQ::sliderHeight); Point<int> sliderPosStart(57, 43); Point<int> sliderPosEnd(57, 43 + 160); // slider Low fSliderLow = new ImageSlider(this, sliderImage); fSliderLow->setStartPos(sliderPosStart); fSliderLow->setEndPos(sliderPosEnd); fSliderLow->setRange(-24.0f, 24.0f); fSliderLow->setValue(0.0f); fSliderLow->setCallback(this); // slider Mid sliderPosStart.setX(120); sliderPosEnd.setX(120); fSliderMid = new ImageSlider(*fSliderLow); fSliderMid->setStartPos(sliderPosStart); fSliderMid->setEndPos(sliderPosEnd); // slider High sliderPosStart.setX(183); sliderPosEnd.setX(183); fSliderHigh = new ImageSlider(*fSliderLow); fSliderHigh->setStartPos(sliderPosStart); fSliderHigh->setEndPos(sliderPosEnd); // slider Master sliderPosStart.setX(287); sliderPosEnd.setX(287); fSliderMaster = new ImageSlider(*fSliderLow); fSliderMaster->setStartPos(sliderPosStart); fSliderMaster->setEndPos(sliderPosEnd); // knobs Image knobImage(DistrhoArtwork3BandEQ::knobData, DistrhoArtwork3BandEQ::knobWidth, DistrhoArtwork3BandEQ::knobHeight); // knob Low-Mid fKnobLowMid = new ImageKnob(this, knobImage); fKnobLowMid->setPos(66, 270); fKnobLowMid->setRange(0.0f, 1000.0f); fKnobLowMid->setValue(220.0f); fKnobLowMid->setCallback(this); // knob Mid-High fKnobMidHigh = new ImageKnob(this, knobImage); fKnobMidHigh->setPos(160, 270); fKnobMidHigh->setRange(1000.0f, 20000.0f); fKnobMidHigh->setValue(2000.0f); fKnobMidHigh->setCallback(this); // about button Image aboutImageNormal(DistrhoArtwork3BandEQ::aboutButtonNormalData, DistrhoArtwork3BandEQ::aboutButtonNormalWidth, DistrhoArtwork3BandEQ::aboutButtonNormalHeight); Image aboutImageHover(DistrhoArtwork3BandEQ::aboutButtonHoverData, DistrhoArtwork3BandEQ::aboutButtonHoverWidth, DistrhoArtwork3BandEQ::aboutButtonHoverHeight); fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover); fButtonAbout->setPos(264, 300); fButtonAbout->setCallback(this); }