HISE Logo Forum
    • Categories
    • Register
    • Login

    Website buttons question (Testing 2 different methods)

    Scheduled Pinned Locked Moved General Questions
    6 Posts 4 Posters 381 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.
    • SteveRiggsS
      SteveRiggs
      last edited by

      Hi guys,

      I'm testing 2 different methods to have a clickable 'open website' button on one of my plugins.

      One way is with actual buttons, and one is with panels.

      The panels way works well, but the button's method would be better for me. With that way though, I've noticed that the website opens as soon as the plugin is loaded, not just when the button is clicked.

      Is there a way to stop this at all and just have the website open when the button is actually clicked?

      Code below. Thanks in advance...

      const var GetMorePluginsButton = Content.getComponent("GetMorePluginsButton");
      
      inline function onGetMorePluginsButtonControl(component, value)
      {
          Engine.openWebsite("https://website.com");
      };
      
      Content.getComponent("GetMorePluginsButton").setControlCallback(onGetMorePluginsButtonControl);
      

      www.anarchyaudioworx.com

      www.facebook.com/groups/audioworx/

      d.healeyD LindonL 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @SteveRiggs
        last edited by

        @SteveRiggs SaveInPreset ;)

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

        SteveRiggsS 1 Reply Last reply Reply Quote 1
        • SteveRiggsS
          SteveRiggs @d.healey
          last edited by SteveRiggs

          @d-healey

          So it is! 😂

          I've lost count how many times has that SaveInPreset function has stumped me now. One day I'll learn haha.

          Thanks.

          www.anarchyaudioworx.com

          www.facebook.com/groups/audioworx/

          DalartD 1 Reply Last reply Reply Quote 0
          • DalartD
            Dalart @SteveRiggs
            last edited by

            @SteveRiggs HaHa it gets me still quite a few times :P

            1 Reply Last reply Reply Quote 1
            • LindonL
              Lindon @SteveRiggs
              last edited by Lindon

              @SteveRiggs said in Website buttons question (Testing 2 different methods):

              inline function onGetMorePluginsButtonControl(component, value)
              {
              Engine.openWebsite("https://website.com");
              };

              of course the other alternative (for those times when you want to save the state of your button) would be:

              inline function onGetMorePluginsButtonControl(component, value)
              {
                  if (value)
                      {
                        Engine.openWebsite("https://website.com");
                        component.setValue(0);
                      };
              };
              

              HISE Development for hire.
              www.channelrobot.com

              SteveRiggsS 1 Reply Last reply Reply Quote 1
              • SteveRiggsS
                SteveRiggs @Lindon
                last edited by

                @Lindon Ah great. I'll make a note :) Thanks mate

                www.anarchyaudioworx.com

                www.facebook.com/groups/audioworx/

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

                46

                Online

                1.7k

                Users

                11.7k

                Topics

                101.8k

                Posts