HISE Logo Forum
    • Categories
    • Register
    • Login

    Multiple page?

    Scheduled Pinned Locked Moved General Questions
    23 Posts 4 Posters 5.4k 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
      last edited by

      I'm using the latest version from GitHub - built on 6th December

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

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        Content.setHeight() is still available so it should not be the culprit here.

        I found the smartest solution to handle multiple page logic is to write a function that shows and hides all pages at once and then just call this function from every button callback with the page you want to show as parameter. The advantage of this approach is that you can also put a function call to this function in you onInit callback to set the default view (and change this during development while you are working on a certain page)

        1 Reply Last reply Reply Quote 0
        • staiffS
          staiff
          last edited by staiff

          sorry for that, but just downloaded this repository (6Dec) and tried, but: NO. With content set Height i just have a small Y black rectangle, no interface.
          as i wrote before.

          funny ....

          for multiples pages , also see: http://forum.hise.audio/topic/117/multiple-interfaces

          tried this snippet, and with some ajustments it works.

          your setheight:
          alt text

          the content.makefrontinterface:

          alt text

          Excuse me i'm French.

          1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart
            last edited by

            Content.setHeight() sets only the height, but the width is zero. So you need add Content.setWidth() or just call Content.makeFrontInterface() to save some typing :)

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

              I was just working in the Main Workspace so there was no need to set a width.

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

              1 Reply Last reply Reply Quote 0
              • alexaudio10A
                alexaudio10
                last edited by

                Hello,

                I have two versions, version 1.1.1, which I keep for my old project (there are .js commands) that does not work on the Other. And the last of github that I compile.

                On both it does not work, I have no idea why. When I click on the button, no page closes or opens ... Nothing happens.

                In the last example, I do not see the green scriptpanel. Yet, nothing to do with the buttons .... And that's on both versions.

                I can have misery!

                1 Reply Last reply Reply Quote 0
                • alexaudio10A
                  alexaudio10
                  last edited by

                  Good! It still does not work after several hours of work ....

                  Here is the code:

                  const var page1 = Content.addPanel("page1", 18, 290);
                  // [JSON page1]
                  Content.setPropertiesFromJSON("page1", {
                  "width": 300,
                  "height": 200,
                  "itemColour": 4294901845,
                  "itemColour2": 4294901845
                  });
                  // [/JSON page1]
                  page1.set("height", 200);
                  page1.set("width", 300);
                  page1.set("itemColour", 0xFFFF0055);
                  page1.set("itemColour2", 0xFFFF0055);

                  const var page2 = Content.addPanel("page2", 103, 0);
                  // [JSON page2]
                  Content.setPropertiesFromJSON("page2", {
                  "width": 300,
                  "height": 200,
                  "itemColour": 4278255445,
                  "itemColour2": 4278255445
                  });
                  // [/JSON page2]
                  page2.set("height", 200);
                  page2.set("width", 300);
                  page2.set("itemColour", 0xFF00FF55);
                  page2.set("itemColour2", 0xFF00FF55);

                  const var button1 = Content.addButton("button1", 0, 210);
                  // [JSON button1]
                  Content.setPropertiesFromJSON("button1", {

                  });
                  // [/JSON button1]
                  button1.set("radioGroup", 1);

                  const var button2 = Content.addButton("button2", 0, 310);
                  // [JSON button2]
                  Content.setPropertiesFromJSON("button2", {

                  });
                  // [/JSON button2]
                  button2.set("radioGroup", 1);

                  If anyone sees an error, please help me! I based myself on the HiseSnippet you sent me!

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

                    Well I can see you're using JSON and control.set() you only need to use one. Also you've only posted the contents of your on init callback. What's not working exactly?

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

                    1 Reply Last reply Reply Quote 0
                    • alexaudio10A
                      alexaudio10
                      last edited by

                      Hello,

                      Everything is now Ok! It remains for me to focus on my plugin! Thank you all.

                      1 Reply Last reply Reply Quote 1
                      • alexaudio10A
                        alexaudio10
                        last edited by

                        Hello,

                        One last thing. When I recall my presets, it is not page 1 which comes back (bg1) .... Why?

                        Is there a way to say that page one is master?

                        1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart
                          last edited by Christoph Hart

                          You need to exclude the buttons from being saved / restored in a preset. Just set the „saveInPreset“ property to false.

                          1 Reply Last reply Reply Quote 0
                          • alexaudio10A
                            alexaudio10
                            last edited by

                            Hello,

                            I think it works. At least, each time I change the preset the mastre remains in place.

                            It's normal when I recompile, I have to press on a tabs for it to come back ...? In any case, I think it's ok.

                            1 Reply Last reply Reply Quote 0
                            • staiffS
                              staiff
                              last edited by staiff

                              hello !
                              in my example shown above all working with 8 panels.
                              the problem seems that each time i open the project/or the compiled VST all the Panels are visible.
                              i must click on the Tab1 to have only one.
                              why ?

                              Excuse me i'm French.

                              1 Reply Last reply Reply Quote 0
                              • staiffS
                                staiff
                                last edited by

                                Fixed !
                                problem found/solved by myself.

                                Excuse me i'm French.

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

                                14

                                Online

                                1.7k

                                Users

                                11.8k

                                Topics

                                103.2k

                                Posts