From e92ac4ebddc040223361b5832f77e18312f54e9e Mon Sep 17 00:00:00 2001 From: George Reales Date: Mon, 14 Dec 2020 09:56:44 +0100 Subject: [PATCH 1/2] Update OB-Xd.jucer --- OB-Xd.jucer | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/OB-Xd.jucer b/OB-Xd.jucer index 850cf80..32d33dc 100644 --- a/OB-Xd.jucer +++ b/OB-Xd.jucer @@ -1,18 +1,18 @@ - + buildStandalone="1" enableIAA="0" jucerFormatVersion="1"> @@ -179,7 +179,8 @@ - + From c6aea08d957f7785c93efcf92b2082be9c9f42c7 Mon Sep 17 00:00:00 2001 From: George Reales Date: Mon, 14 Dec 2020 19:27:00 +0100 Subject: [PATCH 2/2] Update PluginEditor.cpp --- Source/PluginEditor.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 54c766c..c01ca10 100755 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -460,6 +460,24 @@ void ObxdAudioProcessorEditor::resultFromMenu (const Point pos) } } +void ObxdAudioProcessorEditor::nextProgram() { + int cur = processor.getCurrentProgram() + 1; + if (cur == processor.getNumPrograms()) { + cur = 0; + } + processor.setCurrentProgram (cur); + clean(); + loadSkin (processor); +} +void ObxdAudioProcessorEditor::prevProgram() { + int cur = processor.getCurrentProgram() - 1; + if (cur < 0) { + cur = processor.getNumPrograms() - 1; + } + processor.setCurrentProgram (cur); + clean(); + loadSkin (processor); +} void ObxdAudioProcessorEditor::buttonClicked (Button* b) { /* @@ -562,3 +580,19 @@ void ObxdAudioProcessorEditor::paint(Graphics& g) } } + +/* +bool ObxdAudioProcessorEditor::keyPressed(const KeyPress & press) { + if (press.getKeyCode() == '+' || press.getKeyCode() == KeyPress::numberPadAdd) + { + nextProgram(); + return false; // r+eturn true when the keypress was handled + } + if (press.getKeyCode() == '-' || press.getKeyCode() == KeyPress::numberPadSubtract) + { + prevProgram(); + return false; // return true when the keypress was handled + } + + return false; // return false if you don't handle the keypress +}*/