Making a button that selects a specific preset
-
Hi again all,
I'm trying to make a button that selects a specific preset in the preset browser.
Here's what I thought might work as the code but it's not working. It compiles ok but when the button is pushed, the preset doesn't change.
Any idea where I've gone wrong?
(My button is called Preset1Button and the preset is just called Preset1)
Engine.getUserPresetList(); Content.getComponent("Preset1Button").setControlCallback(onPreset1ButtonControl); inline function onPreset1Button(component, value) { if(value == 1) Engine.loadUserPreset("Preset1")(false); };
-
@SteveRiggs said in Making a button that selects a specific preset:
Engine.loadUserPreset("Preset1")(false);
I'm pretty sure this function has been broken for ages. - https://forum.hise.audio/topic/1142/engine-loaduserpreset
-
@d-healey Ah, no way. I wondered what was going on. Would that code be correct if it wasn't broken? Or is there another way I wonder...
-
@Christoph-Hart Sorry to bug mate, is it possible to fix the Engine.loadUserPreset function at all? I've got a great idea but can do it without this function.