HISE Logo Forum
    • Categories
    • Register
    • Login

    Preset liste and extension combobox

    Scheduled Pinned Locked Moved General Questions
    6 Posts 2 Posters 312 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yall
      last edited by

      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? :)

      DanHD 1 Reply Last reply Reply Quote 0
      • DanHD
        DanH @yall
        last edited by

        @yall do you mean 'Expansion' rather than 'extension'?

        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
        https://dhplugins.com/ | https://dcbreaks.com/
        London, UK

        Y 1 Reply Last reply Reply Quote 0
        • Y
          yall @DanH
          last edited by

          @danh yes sorry ^^

          DanHD 1 Reply Last reply Reply Quote 0
          • DanHD
            DanH @yall
            last edited by

            @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);
            

            DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
            https://dhplugins.com/ | https://dcbreaks.com/
            London, UK

            Y 1 Reply Last reply Reply Quote 0
            • Y
              yall @DanH
              last edited by

              @danh and you think that once the expansion is selected the preset panel will display the presets corresponding to the expansion?

              DanHD 1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @yall
                last edited by

                @yall that's what happens in my project yes

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                36

                Online

                1.8k

                Users

                12.0k

                Topics

                104.1k

                Posts