commit 8fe9af8d46da77192c1bd2a959d2645597d374ac
parent 86f76a45a4e55c23b59ffe271ea88d2815a09f06
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Wed, 31 Jul 2024 11:01:02 +0200
add dummy patch manager
Diffstat:
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/source/nord/n2x/n2xJucePlugin/n2xEditor.cpp b/source/nord/n2x/n2xJucePlugin/n2xEditor.cpp
@@ -4,6 +4,7 @@
#include "n2xPluginProcessor.h"
#include "n2xController.h"
+#include "n2xPatchManager.h"
#include "jucePluginLib/parameterbinding.h"
@@ -17,6 +18,23 @@ namespace n2xJucePlugin
create(_jsonFilename);
addMouseListener(this, true);
+ {
+ // Init Patch Manager
+ const auto container = findComponent("PatchManager");
+ constexpr auto scale = 1.0f;
+ const float x = static_cast<float>(container->getX());
+ const float y = static_cast<float>(container->getY());
+ const float w = static_cast<float>(container->getWidth());
+ const float h = static_cast<float>(container->getHeight());
+ container->setTransform(juce::AffineTransform::scale(scale, scale));
+ container->setSize(static_cast<int>(w / scale),static_cast<int>(h / scale));
+ container->setTopLeftPosition(static_cast<int>(x / scale),static_cast<int>(y / scale));
+
+ const auto configOptions = getProcessor().getConfigOptions();
+ const auto dir = configOptions.getDefaultFile().getParentDirectory();
+
+ setPatchManager(new PatchManager(*this, container, dir));
+ }
}
Editor::~Editor()
diff --git a/source/nord/n2x/n2xJucePlugin/skins/n2xTrancy/n2xTrancy.json b/source/nord/n2x/n2xJucePlugin/skins/n2xTrancy/n2xTrancy.json
@@ -14,6 +14,7 @@
{ "name" : "Cutoff", "parameterAttachment" : { "parameter" : "Cutoff" }, "rotary" : { }, "spritesheet" : { "x" : "974", "y" : "244", "width" : "137", "height" : "137", "texture" : "knob_big", "tileSizeX" : "137", "tileSizeY" : "137" } },
{ "name" : "Resonance", "parameterAttachment" : { "parameter" : "Resonance" }, "rotary" : { }, "spritesheet" : { "x" : "1219", "y" : "244", "width" : "137", "height" : "137", "texture" : "knob_big", "tileSizeX" : "137", "tileSizeY" : "137" } },
]
- }
+ },
+ {"name":"PatchManager","component":{"x":"0","y":"0","width":"2638","height":"1301"}}
]
}