Expansion ComboBox + Populate with Weblink
-
@DanH Why not add the permanent entries to the end of your array when you're populating the combo box?
-
@d-healey ok thanks, I can add things into the array - how can I make them at the end? Currently they appear at the top of the list. Here's my code
const var expansionNames = ["test"]; expansionNames.push("FACTORY"); for(e in expHandler.getExpansionList()) expansionNames.push(e.getProperties().Name); //const var ExpansionSelector = Content.getComponent("ExpansionSelector"); ExpansionSelector.set("items", expansionNames.join("\n")); // Implement the expansion switch inline function onExpansionSelectorControl(component, value) { local expansionToLoad = component.getItemText(); // We want the first item to reset the current expansion // so we need to change it to an empty string if(expansionToLoad == expansionNames[0]) expansionToLoad = ""; expHandler.setCurrentExpansion(expansionToLoad); }; Content.getComponent("ExpansionSelector").setControlCallback(onExpansionSelectorControl);
-
Array.push()
- video on Patreon ;) -
@d-healey I have a feeling it was me who inspired you to make said video
-
@d-healey Not sure this is suitable actually - If I select the new option it makes the behaviour of selecting expansions not work on the next selection (as in when you go to select an expansion).
-
@d-healey trying to follow your expansions video but i dont have the option in juce for HISE_ENABLE_EXPANSIONS. the closest thing i have is HISE_USE_CUSTOM_EXPANSIPN_TYPE. im using the most recent hise develop build and juce 6.1.6
-
@argon
That's video is quite out of date now.
You can add that option as a preprocessor definition:
-
@d-healey sweet thank you i do have that added. i dont see the file browser in the sampler workspace. do i need to enable that somewhere?
-
@argon A lot has changed since that video was made. The file browser is in the left hand side bar of the latest version of HISE. It's the Project Directory tab.
-
@d-healey youre a rockstar David thank you