HISE Logo Forum
    • Categories
    • Register
    • Login

    Expansion ComboBox + Populate with Weblink

    Scheduled Pinned Locked Moved General Questions
    11 Posts 3 Posters 604 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.
    • DanHD
      DanH
      last edited by

      I use a combo box to switch between expansions and the factory presets. It would be neat if I could have a break line at the bottom of the list and then a kind of 'Buy Expansion' option underneath which then directs the user to a website.

      Can I have permanent entries in the combo box as well as a dynamic list of expansions?

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

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @DanH
        last edited by

        @DanH Why not add the permanent entries to the end of your array when you're populating the combo box?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        DanHD 1 Reply Last reply Reply Quote 0
        • DanHD
          DanH @d.healey
          last edited by

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

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

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey
            last edited by

            Array.push() - video on Patreon ;)

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            DanHD Adam_GA 3 Replies Last reply Reply Quote 1
            • DanHD
              DanH @d.healey
              last edited by

              @d-healey I have a feeling it was me who inspired you to make said video 😆

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

              1 Reply Last reply Reply Quote 2
              • DanHD
                DanH @d.healey
                last edited by

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

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

                1 Reply Last reply Reply Quote 0
                • Adam_GA
                  Adam_G @d.healey
                  last edited by Adam_G

                  @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

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @Adam_G
                    last edited by

                    @argon

                    That's video is quite out of date now.

                    You can add that option as a preprocessor definition:

                    37fca93d-f9a0-4c58-90a1-c612db23aeb5-image.png

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    Adam_GA 1 Reply Last reply Reply Quote 0
                    • Adam_GA
                      Adam_G @d.healey
                      last edited by

                      @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?

                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @Adam_G
                        last edited by

                        @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.

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        Adam_GA 1 Reply Last reply Reply Quote 0
                        • Adam_GA
                          Adam_G @d.healey
                          last edited by

                          @d-healey youre a rockstar David thank you

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

                          55

                          Online

                          1.7k

                          Users

                          11.7k

                          Topics

                          102.2k

                          Posts