Skip to content

Commit

Permalink
Make Trigger and Wobble buildable with cairo
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Jul 21, 2021
1 parent 824e969 commit 78a0d76
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -11,7 +11,7 @@ all: dgl plugins gen
# --------------------------------------------------------------

dgl:
ifeq ($(HAVE_DGL),true)
ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
$(MAKE) -C dpf/dgl
endif

Expand Down
2 changes: 1 addition & 1 deletion dpf
Submodule dpf updated 1 files
+4 −0 Makefile.plugins.mk
4 changes: 0 additions & 4 deletions plugins/PowerJuice/Makefile
Expand Up @@ -27,10 +27,6 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

ifeq ($(LINUX),true)
all: jack lv2 vst
else
all: lv2 vst
endif

# --------------------------------------------------------------
4 changes: 0 additions & 4 deletions plugins/PowerJuiceX2/Makefile
Expand Up @@ -27,10 +27,6 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

ifeq ($(LINUX),true)
all: jack lv2 vst
else
all: lv2 vst
endif

# --------------------------------------------------------------
4 changes: 0 additions & 4 deletions plugins/StutterJuice/Makefile
Expand Up @@ -27,10 +27,6 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

ifeq ($(LINUX),true)
all: jack lv2_sep vst
else
all: lv2_sep vst
endif

# --------------------------------------------------------------
5 changes: 1 addition & 4 deletions plugins/TriggerJuice/Makefile
Expand Up @@ -22,15 +22,12 @@ FILES_UI = \
# --------------------------------------------------------------
# Do some magic

UI_TYPE=generic
include ../../dpf/Makefile.plugins.mk

# --------------------------------------------------------------
# Enable all possible plugin types

ifeq ($(LINUX),true)
all: jack lv2_sep vst
else
all: lv2_sep vst
endif

# --------------------------------------------------------------
18 changes: 10 additions & 8 deletions plugins/TriggerJuice/TriggerJuiceUI.cpp
Expand Up @@ -31,21 +31,21 @@ TriggerJuiceUI::TriggerJuiceUI()
fAboutWindow(this)
{
// background
fImgBackground = Image(TriggerJuiceArtwork::backgroundData, TriggerJuiceArtwork::backgroundWidth, TriggerJuiceArtwork::backgroundHeight, GL_BGRA);
fImgBackground = Image(TriggerJuiceArtwork::backgroundData, TriggerJuiceArtwork::backgroundWidth, TriggerJuiceArtwork::backgroundHeight, kImageFormatBGRA);

// about
Image imageAbout(TriggerJuiceArtwork::aboutData, TriggerJuiceArtwork::aboutWidth, TriggerJuiceArtwork::aboutHeight, GL_BGRA);
Image imageAbout(TriggerJuiceArtwork::aboutData, TriggerJuiceArtwork::aboutWidth, TriggerJuiceArtwork::aboutHeight, kImageFormatBGRA);
fAboutWindow.setImage(imageAbout);

// about button
Image aboutImageNormal(TriggerJuiceArtwork::aboutButtonNormalData, TriggerJuiceArtwork::aboutButtonNormalWidth, TriggerJuiceArtwork::aboutButtonNormalHeight);
Image aboutImageHover(TriggerJuiceArtwork::aboutButtonHoverData, TriggerJuiceArtwork::aboutButtonHoverWidth, TriggerJuiceArtwork::aboutButtonHoverHeight);
Image aboutImageNormal(TriggerJuiceArtwork::aboutButtonNormalData, TriggerJuiceArtwork::aboutButtonNormalWidth, TriggerJuiceArtwork::aboutButtonNormalHeight, kImageFormatBGRA);
Image aboutImageHover(TriggerJuiceArtwork::aboutButtonHoverData, TriggerJuiceArtwork::aboutButtonHoverWidth, TriggerJuiceArtwork::aboutButtonHoverHeight, kImageFormatBGRA);
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover);
fButtonAbout->setAbsolutePos(358, 17);
fButtonAbout->setCallback(this);

// knobs
Image knobImage(TriggerJuiceArtwork::knobData, TriggerJuiceArtwork::knobWidth, TriggerJuiceArtwork::knobHeight);
Image knobImage(TriggerJuiceArtwork::knobData, TriggerJuiceArtwork::knobWidth, TriggerJuiceArtwork::knobHeight, kImageFormatBGRA);

// knob KnobAttack
fKnobAttack = new ImageKnob(this, knobImage);
Expand All @@ -64,7 +64,7 @@ TriggerJuiceUI::TriggerJuiceUI()
fKnobRelease->setCallback(this);

// sliders
Image sliderImage(TriggerJuiceArtwork::sliderData, TriggerJuiceArtwork::sliderWidth, TriggerJuiceArtwork::sliderHeight);
Image sliderImage(TriggerJuiceArtwork::sliderData, TriggerJuiceArtwork::sliderWidth, TriggerJuiceArtwork::sliderHeight, kImageFormatBGRA);
Point<int> sliderPosStart(293, 74);
Point<int> sliderPosEnd(293+11, 74);

Expand Down Expand Up @@ -146,7 +146,7 @@ void TriggerJuiceUI::imageButtonClicked(ImageButton* button, int)
if (button != fButtonAbout)
return;

fAboutWindow.exec();
fAboutWindow.runAsModal();
}

void TriggerJuiceUI::imageKnobDragStarted(ImageKnob* knob)
Expand Down Expand Up @@ -205,7 +205,9 @@ void TriggerJuiceUI::imageSliderValueChanged(ImageSlider* slider, float value)

void TriggerJuiceUI::onDisplay()
{
fImgBackground.draw();
const GraphicsContext& context(getGraphicsContext());

fImgBackground.draw(context);
}

// -----------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions plugins/VectorJuice/Makefile
Expand Up @@ -27,10 +27,6 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

ifeq ($(LINUX),true)
all: jack lv2_sep vst
else
all: lv2_sep vst
endif

# --------------------------------------------------------------
5 changes: 1 addition & 4 deletions plugins/WobbleJuice/Makefile
Expand Up @@ -22,15 +22,12 @@ FILES_UI = \
# --------------------------------------------------------------
# Do some magic

UI_TYPE=generic
include ../../dpf/Makefile.plugins.mk

# --------------------------------------------------------------
# Enable all possible plugin types

ifeq ($(LINUX),true)
all: jack lv2_sep vst
else
all: lv2_sep vst
endif

# --------------------------------------------------------------
14 changes: 8 additions & 6 deletions plugins/WobbleJuice/WobbleJuiceUI.cpp
Expand Up @@ -29,14 +29,14 @@ WobbleJuiceUI::WobbleJuiceUI()
setSize(WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight);

// background
fImgBackground = Image(WobbleJuiceArtwork::backgroundData, WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight, GL_BGR);
fImgBackground = Image(WobbleJuiceArtwork::backgroundData, WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight, kImageFormatBGR);

// about
Image aboutImage(WobbleJuiceArtwork::aboutData, WobbleJuiceArtwork::aboutWidth, WobbleJuiceArtwork::aboutHeight, GL_BGR);
Image aboutImage(WobbleJuiceArtwork::aboutData, WobbleJuiceArtwork::aboutWidth, WobbleJuiceArtwork::aboutHeight, kImageFormatBGR);
fAboutWindow.setImage(aboutImage);

// knobs
Image knobImage(WobbleJuiceArtwork::knobData, WobbleJuiceArtwork::knobWidth, WobbleJuiceArtwork::knobHeight);
Image knobImage(WobbleJuiceArtwork::knobData, WobbleJuiceArtwork::knobWidth, WobbleJuiceArtwork::knobHeight, kImageFormatBGRA);

// knob Division
fKnobDivision = new ImageKnob(this, knobImage, ImageKnob::Vertical);
Expand Down Expand Up @@ -94,8 +94,8 @@ WobbleJuiceUI::WobbleJuiceUI()
fKnobDrive->setCallback(this);

// about button
Image aboutImageNormal(WobbleJuiceArtwork::aboutButtonNormalData, WobbleJuiceArtwork::aboutButtonNormalWidth, WobbleJuiceArtwork::aboutButtonNormalHeight);
Image aboutImageHover(WobbleJuiceArtwork::aboutButtonHoverData, WobbleJuiceArtwork::aboutButtonHoverWidth, WobbleJuiceArtwork::aboutButtonHoverHeight);
Image aboutImageNormal(WobbleJuiceArtwork::aboutButtonNormalData, WobbleJuiceArtwork::aboutButtonNormalWidth, WobbleJuiceArtwork::aboutButtonNormalHeight, kImageFormatBGRA);
Image aboutImageHover(WobbleJuiceArtwork::aboutButtonHoverData, WobbleJuiceArtwork::aboutButtonHoverWidth, WobbleJuiceArtwork::aboutButtonHoverHeight, kImageFormatBGRA);
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover);
fButtonAbout->setAbsolutePos(390, 20);
fButtonAbout->setCallback(this);
Expand Down Expand Up @@ -174,7 +174,9 @@ void WobbleJuiceUI::imageKnobValueChanged(ImageKnob* knob, float value)

void WobbleJuiceUI::onDisplay()
{
fImgBackground.draw();
const GraphicsContext& context(getGraphicsContext());

fImgBackground.draw(context);
}

// -----------------------------------------------------------------------
Expand Down

0 comments on commit 78a0d76

Please sign in to comment.