Forum

    • Register
    • Login
    • Search
    • Categories

    Website buttons question (Testing 2 different methods)

    General Questions
    4
    6
    150
    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.
    • SteveRiggs
      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.healey Lindon 2 Replies Last reply Reply Quote 0
      • d.healey
        d.healey @SteveRiggs last edited by

        @SteveRiggs SaveInPreset 😉

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

        SteveRiggs 1 Reply Last reply Reply Quote 1
        • SteveRiggs
          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/

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

            @SteveRiggs HaHa it gets me still quite a few times 😛

            1 Reply Last reply Reply Quote 1
            • Lindon
              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

              SteveRiggs 1 Reply Last reply Reply Quote 1
              • SteveRiggs
                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

                13
                Online

                1.1k
                Users

                7.0k
                Topics

                64.6k
                Posts