DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit a4726193e21cee15500f422813721c81e6f71a0d
parent a8ab64504d52c4dd6099d26db97674c390989dbc
Author: falkTX <falktx@falktx.com>
Date:   Wed,  2 Jun 2021 17:32:59 +0100

Build filehandling plugin by default, resize/pos button

Diffstat:
MMakefile | 2++
Mexamples/FileHandling/FileHandlingUI.cpp | 13++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -21,6 +21,7 @@ dgl: examples: dgl $(MAKE) all -C examples/CVPort + $(MAKE) all -C examples/FileHandling $(MAKE) all -C examples/Info $(MAKE) all -C examples/Latency $(MAKE) all -C examples/Meters @@ -64,6 +65,7 @@ clean: $(MAKE) clean -C dgl $(MAKE) clean -C examples/CVPort $(MAKE) clean -C examples/CairoUI + $(MAKE) clean -C examples/FileHandling $(MAKE) clean -C examples/Info $(MAKE) clean -C examples/Latency $(MAKE) clean -C examples/Meters diff --git a/examples/FileHandling/FileHandlingUI.cpp b/examples/FileHandling/FileHandlingUI.cpp @@ -183,12 +183,20 @@ protected: { fScale = static_cast<float>(ev.size.getHeight())/kInitialHeight; + fButton1.setAbsolutePos(5*fScale, 5*fScale); + fButton2.setAbsolutePos(5*fScale, 105*fScale); + fButton3.setAbsolutePos(5*fScale, 205*fScale); + + fButton1.setSize(100*fScale, 30*fScale); + fButton2.setSize(100*fScale, 30*fScale); + fButton3.setSize(100*fScale, 30*fScale); + UI::onResize(ev); } void buttonClicked(Button* const button, bool) override { - States stateId = kStateCount; + States stateId; /**/ if (button == &fButton1) stateId = kStateFile1; @@ -196,8 +204,7 @@ protected: stateId = kStateFile2; else if (button == &fButton3) stateId = kStateFile3; - - if (stateId == kStateCount) + else return; requestStateFile(kStateKeys[stateId]);