HISE Logo Forum
    • Categories
    • Register
    • Login

    Switching panels , duplicate code.

    Scheduled Pinned Locked Moved General Questions
    20 Posts 2 Posters 721 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.
    • d.healeyD
      d.healey @lalalandsynth
      last edited by

      @lalalandsynth Yeah

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

      1 Reply Last reply Reply Quote 1
      • lalalandsynthL
        lalalandsynth
        last edited by

        ok so I need to have another name for the const Var .

        I would think it would work like this ...I am stumbling through here while I learn :) Must admit I dont know what I am doing.
        This is the code for the second switch , and still does not work .

        // Switch Main to Preset Browser
        const var Plusknob = Content.getComponent("Plusknob");
        const var OKknob = Content.getComponent("OKknob");
        
        
        const var MAIN = Content.getComponent("MAIN");
        const var PrstPanel = Content.getComponent("PrstPanel");
        // Into Array
        const var pages1 = [MAIN,PrstPanel];
        
        inline function handlePages(pageToShow)
        
        {
                for(z in pages)
                    z.set("visible", pageToShow == z);
        }
        //Default
        //handlePages(PrstPanel
        

        https://lalalandaudio.com/

        https://lalalandsynth.com/

        https://www.facebook.com/lalalandsynth

        https://www.facebook.com/lalalandsynth

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

          @lalalandsynth said in Switching panels , duplicate code.:

          Must admit I dont know what I am doing.

          I don't know what you're doing either :p

          Here's a simple way to do it

          HiseSnippet 1156.3ocsXssaaaDDcornQDaUPCP9.VjmjfScHYtU.WipZ4Kvn01BUtFFHHHfhbkzBSsKA4R6HD39EzOn9X9b7i8OHcVdQjRlRkhIluXuyMdlyN6NbTOetMIHf6iTZb9TOBR46U6OkIF2crEkgNdejxiUOwJPP7wwh1apmUP.wAonrwQRAJMpihd92eYOKWKlMISDBcAmZS9c5DpHSZuN+F008PKGx4zI4r9UcN1ly5xc4g.d1PUG4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z3MY70lpGLbHwVjA15pGdYUmUcMfxevCET1nSrD9TYwvogS5CmBsI.RXxOqSVfTSdRLdstbsjY5SXNQK9B7jnzPtVIQoQpRzDKae9GRmLBH0GEIAvDK52Ing5Ix03YcuUU02VGMAla+C11Rp3GArWrOlUvmWVAedUE740Uvm2TAedaE74mVoOxexjeMTvmDeLADz6fnulRQ4.lETkEUQh9O.52DH0C
          

          You might also find this video helpful if you haven't seen it before.

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

          1 Reply Last reply Reply Quote 1
          • lalalandsynthL
            lalalandsynth
            last edited by lalalandsynth

            Ok, will look at that video .

            I might not have explained properly either.
            The three buttons that do work , should reside in main panel, then I want to switch between main (containing the three switches) to just the Preset manager thereby removing the three from view.

            This is what I am trying to achieve, just doing it manually.
            Although eventually I would like it to be just the one button that opens up the preset browser
            Switching.gif

            https://lalalandaudio.com/

            https://lalalandsynth.com/

            https://www.facebook.com/lalalandsynth

            https://www.facebook.com/lalalandsynth

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

              The three buttons that do work , should reside in main panel, then I want to switch between main (containing the three switches) to just the Preset manager thereby removing the three from view.

              The example I posted shows how to do that. I just put all of the panels and buttons separate but you can put them inside each other to get the layout you want.

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

              lalalandsynthL 1 Reply Last reply Reply Quote 0
              • lalalandsynthL
                lalalandsynth @d.healey
                last edited by

                @d-healey Awesome, thanks testing this.

                https://lalalandaudio.com/

                https://lalalandsynth.com/

                https://www.facebook.com/lalalandsynth

                https://www.facebook.com/lalalandsynth

                1 Reply Last reply Reply Quote 0
                • lalalandsynthL
                  lalalandsynth
                  last edited by lalalandsynth

                  @d-healey
                  Excellent !!!! Thanks so much , I have struggled with this for longer then I care to admit .

                  Thanks for your help an patience :)

                  Quick question if I may, would it need much modification to to able to switch the second group with a bool/one button rather then 2 buttons ?
                  I would like to make btnGroupTwo1 do the switching .

                  Not essential just curious

                  It seems to want to default to btnGroupOne2, trying to hack my way through changing that :)

                  https://lalalandaudio.com/

                  https://lalalandsynth.com/

                  https://www.facebook.com/lalalandsynth

                  https://www.facebook.com/lalalandsynth

                  1 Reply Last reply Reply Quote 0
                  • lalalandsynthL
                    lalalandsynth
                    last edited by

                    I am having a problem with this .

                    1.When Compiled it always goes to the same window.
                    2, I cannot get this to be saved in a preset even though the buttons are set to saveInPreset, ...unless its problem #1 that is overriding it ?

                    https://lalalandaudio.com/

                    https://lalalandsynth.com/

                    https://www.facebook.com/lalalandsynth

                    https://www.facebook.com/lalalandsynth

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

                      Any control that has saveInPreset set to true will trigger its on control callback after on init completes. So if you have saveInPreset enabled on your page switching buttons the last button that triggers after on init will determine which page is displayed when your script runs.

                      I have a video on my Patreon page about making a tabbed interface and I'm pretty sure I cover this situation there.

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

                      1 Reply Last reply Reply Quote 1
                      • lalalandsynthL
                        lalalandsynth
                        last edited by

                        Thanks , checking out some videos

                        https://lalalandaudio.com/

                        https://lalalandsynth.com/

                        https://www.facebook.com/lalalandsynth

                        https://www.facebook.com/lalalandsynth

                        1 Reply Last reply Reply Quote 0
                        • lalalandsynthL
                          lalalandsynth
                          last edited by

                          @d-healey I watched that video again , did the tutorial but I guess I am still a bit confused.
                          Is there really no way to store which panel should show in a preset ?

                          My plugin has this configuration where the panels are small, medium, large and which one is shown needs to be saved in a preset .rvb.jpg

                          https://lalalandaudio.com/

                          https://lalalandsynth.com/

                          https://www.facebook.com/lalalandsynth

                          https://www.facebook.com/lalalandsynth

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

                            @lalalandsynth You made another thread about this, I've responded there already :)

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

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

                            17

                            Online

                            1.8k

                            Users

                            12.1k

                            Topics

                            105.4k

                            Posts