Last hurdle: Does anyone know how to make a simpler drop down menu that displays the user presets?
-
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.3ocsW01aiTCD1aZ2x0b7xcRHw2Pqh3CoPUzlj1RuqBnMMsPzcsWTSuCjNfJmccRL0wNx1aaiP2W3WB+R32z8M9HLd2MYeIaeUvVolLdlG6mY1YFOoqT3QTJgDYU9zoSHHqOzt2Ttdz9ivTNpSaj0Sr6JIJh9rVRwkJhD0Z5DrRQ7QVVK88FqrVcYT3y6+tVXFl6QRVBgdif5QdIcLUmrZ2ceAkwND6SNkNNk0araGOAeeASD.LZIaWzDr243gjiwFyJYi9ArZDx5KsazXf21tta2r4ltXbSeLdi5jlOiLXqAda59LW+9a5B+s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wrSDW1E66CYw2UbyipsDAbeim91HEGIjwuHxqII6KulYw4EzV9cn4EtsKktv8WsxVTtxs1a5ZJC+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
-
@Delamere use a viewport and check 'useList' then you can populate it and use it just like a combobox, so you can set a max height and utilize the scroll-bar feature.
-
@Chazrox Oh I didn't know about this, very handy! Thanks man!
-
@rglides I just found this not too long ago and now im gonna replace MY comboboxes that were through the roof.
-
Another solution might be to use submenus, if appropriate.
-
@d-healey Im still trying to understand how to do that. I dont have an understanding of separators yet. I've tried to find a good example of submenus but I havent found anything in docs or the forum. Theres an example of sub menus in the master tutorials but thats not exactly the sub menu im trying to do. I just want a combobox list to break into categories. How would I do that? Easy enough to explain?
oh, and how would values work in the case of sub categories in a combobox list?
-