Forum
    • Categories
    • Register
    • Login

    How do I embed a link in a button?

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 26 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.
    • K
      kliin
      last edited by

      I would like to embed a link to my patreon on a donate button in my plugin, but I have no idea how I do that since I am new to the software and coding in general. Nothing I have found on the internet, in any video tutorials or in any chatbot has helped me solve the issue. Below is an image of my little project that is hopefully visible to you guys.

      fcc0e793-b3db-4460-a667-28965a708810-image.png

      dannytaurusD 1 Reply Last reply Reply Quote 0
      • dannytaurusD
        dannytaurus @kliin
        last edited by dannytaurus

        @kliin In the button handler use Engine.openWebsite(); with the URL of your web page.

        https://docs.hise.dev/scripting/scripting-api/engine/index.html#openwebsite

        inline function onButton1Control(component, value)
        {
        	if (value) Engine.openWebsite("https://hise.dev");
        };
        
        Content.getComponent("Button1").setControlCallback(onButton1Control);
        

        Meat Beats: https://meatbeats.com
        Klippr Video: https://klippr.video

        K 1 Reply Last reply Reply Quote 2
        • K
          kliin @dannytaurus
          last edited by

          @dannytaurus said in How do I embed a link in a button?:

          inline function onButton1Control(component, value)
          {
          if (value) Engine.openWebsite("https://hise.dev");
          };

          Content.getComponent("Button1").setControlCallback(onButton1Control);

          Ayy thanks man it worked :D

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

          22

          Online

          2.2k

          Users

          13.4k

          Topics

          116.6k

          Posts