UI changes, layout redefinition

This commit is contained in:
Armin 2026-08-15 18:31:51 +02:00
commit 1d9ba772fe
12 changed files with 536 additions and 528 deletions

View file

@ -1,12 +1,37 @@
#include "PresetManager.h"
#include "PluginProcessor.h"
#include "FactoryPresets.h"
PresetManager::PresetManager(FDNReverbAudioProcessor& p)
: processor(p)
{
seedFactoryPresets();
refreshPresetList();
}
// -----------------------------------------------------------------------------
// factory presets
// -----------------------------------------------------------------------------
// embeds Presets/*.ambpreset into the binary, then copies any that are
// missing into the user folder, so the factory set survives fresh installs.
// -----------------------------------------------------------------------------
void PresetManager::seedFactoryPresets()
{
auto folder = getPresetsFolder();
for (int i = 0; i < FactoryPresets::namedResourceListSize; ++i)
{
const auto filename = juce::String::fromUTF8(FactoryPresets::originalFilenames[i]);
auto dest = folder.getChildFile(filename);
if (dest.exists())
continue;
int size = 0;
if (auto* data = FactoryPresets::getNamedResource(FactoryPresets::namedResourceList[i], size))
dest.replaceWithData(data, size);
}
}
// -----------------------------------------------------------------------------
// filesystem
// -----------------------------------------------------------------------------