HISE Logo Forum
    • Categories
    • Register
    • Login

    Momentary State for LAF Panel Button

    Scheduled Pinned Locked Moved Scripting
    7 Posts 2 Posters 313 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.
    • Adam_GA
      Adam_G
      last edited by Adam_G

      hey all, i have a button thats painted on to a panel via LAF. trying to enable a momentary state for this button so it only clicks once. is there a way to set this property? this is what im trying but its not correct:

      Content.setPropertiesFromJSON("ScriptPanel5", {
          "width": 27,
          "height": 29,
          "allowCallbacks": "Clicks Only",
          "enableMidiLearn": true,
          "saveInPreset": true,
          "isMomentary": true
      });
      
      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        i have a button thats painted on to a panel via LAF

        Panels don't have LAF so I assume you mean a paint routine? In which case, why aren't you using LAF with a button?

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

        Adam_GA 1 Reply Last reply Reply Quote 0
        • Adam_GA
          Adam_G @d.healey
          last edited by

          @d-healey yes sorry it is a paint routine. im just trying to use vector images as the buttons. so does that mean im not able to set these as momentary?

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

            @Adam_G A panel is just a panel, it doesn't have button properties. You can make it into a momentary button if you want, but you have to handle it yourself in the mouse callback.

            I think what you should be doing though is using a button with LAF.

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

            Adam_GA 1 Reply Last reply Reply Quote 0
            • Adam_GA
              Adam_G @d.healey
              last edited by

              @d-healey im sure youre right. unfortunately, and to my families disappointment, i suck at math lol. alot of the custom LAF functions elude me. can i still use the svg data in the LAF button?

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

                @Adam_G Yes, that's exactly what LAF is for

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

                Adam_GA 1 Reply Last reply Reply Quote 0
                • Adam_GA
                  Adam_G @d.healey
                  last edited by

                  @d-healey just what i needed thanks David :)

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

                  22

                  Online

                  1.8k

                  Users

                  12.1k

                  Topics

                  105.6k

                  Posts