Preset liste and extension combobox
-
Hello everybody. I'm looking for a way to create a combobox that will load an extension. then the presets will be in the classic oreset browers but in a single list. to explain more precisely, I want yesterday's preset browser to have only one column, that of the presets. but I don't want to go through the browser preset to select an extension. This allows me to have a fairly large vertical list and a small combobox at the top to select an extension. is it possible ? if I click on combobox extension 1, the presets will be displayed, if I click on combobox extension 2 they will be the presets of extension 2. you see the trick?
-
@yall do you mean 'Expansion' rather than 'extension'?
-
@danh yes sorry ^^
-
@yall Yes you can do this, there is an example script in the docs but it goes a bit like this that I'm using - ExpansionSelector is the combo box:
const var expansionNames = []; 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);
-
@danh and you think that once the expansion is selected the preset panel will display the presets corresponding to the expansion?
-
@yall that's what happens in my project yes