Last hurdle: Does anyone know how to make a simpler drop down menu that displays the user presets?
-
@d-healey Okay thanks for the reply, is it possible to create a Save As Button that gives the option to save as a new Preset, not overwrite the current one?
-
@Delamere Yes, it's a little bit more complicated though because you'll need to use the preset handler. I made a video about this on Patreon. https://www.patreon.com/posts/creating-custom-82583366
-
@d-healey Okay thanks.
-
@d-healey I have set this up, and the ComboBox shows the User Presets. But when you select a preset, it says it doesn't exist and doesn't load like it does in the PresetBrowser. Any idea why?
-
@Delamere said in Last hurdle: Does anyone know how to make a simpler drop down menu that displays the user presets?:
Any idea why?
Show me your code. I suspect the file path is wrong.
-
This post is deleted! -
Content.makeFrontInterface(260, 50); const var Preset_Browser = Content.getComponent("Preset_Browser"); inline function onPresetSelected(component, value) { local Selected_Preset = component.getItemText(); Console.print(Selected_Preset); Engine.loadUserPreset(Selected_Preset); } Preset_Browser.setControlCallback(onPresetSelected); inline function updateUserPresetList() { local User_Presets = Engine.getUserPresetList(); Console.print("User Presets: " + User_Presets.join(", ")); } updateUserPresetList();
-
@Delamere well at the very least you will need to add ".preset" to the end of your file name.
local Selected_Preset = component.getItemText() + ".preset";
-
@Delamere Where's the part where you populate the combo box?
-
@Lindon Thanks for the reply.
When adding + ".preset"; It Crashes Hise?
-
@Delamere show us the output from this
Console.print(Selected_Preset);
-
@d-healey Is this right?
Content.makeFrontInterface(260, 50); const var Preset_Browser = Content.getComponent("Preset_Browser"); inline function onPresetSelected(component, value) { local Selected_Preset = component.getItemText(); Console.print(Selected_Preset); if (Selected_Preset.length > 0) Engine.loadUserPreset(Selected_Preset); } Preset_Browser.setControlCallback(onPresetSelected); inline function updateUserPresetList() { local User_Presets = Engine.getUserPresetList(); Console.print("User Presets: " + User_Presets.join(", ")); Preset_Browser.set("items", User_Presets.join("\n")); } updateUserPresetList();
-
-
@Delamere said in Last hurdle: Does anyone know how to make a simpler drop down menu that displays the user presets?:
Is this right?
Not sure, post a snippet so I can see exactly what you're doing
-
HiseSnippet 1315.3ocsW01aiTCD1aZ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DiNDpq0T9vSovqSCq9jXVcajpytwgjH+OOr9Cmce1pq.V+2nXplr5+.OYWsQrwgOgA9R+UIaSYeESJUO7EjVAZsfW44NZY.Y8YZN3pIXtBxrU6ofsJXrwhAXlJwjvDOYwvMUXpEPXp.hrWkFPxxPQI3vft5tyAsmuewmwIDNbYdw5ZC8B0WitdDrzaTKrbQOBegPBAOyrCYTdX.i0EqGMyfrtVrK0AhW9jVBIDUxn+3fwQgPCr5gKEI+ilbvSfjEAn3sg81bq0L2y52y0gk+kvyvzRbOIAOOnFeBqWzGyQEwrSDW1E66CYw2UbyipsDAbeim91HEGIjwuHxqII6KulYw4EzV9cn4EtsKktv8WsxVTtxs1a5ZJC+yoI8F9iL8FZDNw4BCJAinI7CXXc141LSzFq.JixLrjYfHHYQOMca07Cys70eAgapKHtk1+2Q59T6tTs2nh4aoB3q49j+m4a7nwej8ACF.C1jP1ksO7mtw4f+ugJmHBLswOBqkTSeenLtGzR0i.LgyIL0r6BhkcMxlHSOB2OTvzONVYcirUrx5yTB2n3IEm4EcgpYP7GEtBvId3OTYU6iLxNEbS5X32EblmW1sZAfMdn.a9PAtwCE3lOTfa8PA90OTfae6.M+rs8BzhwQkSHzQcOH7BXKqC3XHaLLyE8uYcgRBA
-
@Delamere Disable saveInPreset on your combo box.
And you need to add
+".preset"
as Lindon suggestedEngine.loadUserPreset(Selected_Preset + ".preset");
-
-
@Delamere I should have said, it's the saveInPreset thing that was causing your crash because it created an infinite loop. The preset would load which would trigger the combo box callback, which loads the preset, which triggers the callback, which loads the preset, which goes kaboooom!
-
Is there a way to change the maximum height of the ComboBox drop down so it becomes scrollable & doesn't cover the whole GUI.
-
@Delamere Not that I'm aware of