HISE Logo Forum
    • Categories
    • Register
    • Login

    Buttons only work with a double click the first time you press them

    Scheduled Pinned Locked Moved General Questions
    9 Posts 4 Posters 338 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.
    • M
      meto396
      last edited by

      Hello, some buttons in my plugin have to be double-clicked to work, but it should work immediately after clicking once. saveinPreset is disabled and I've also check everything else

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

        Show some code

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

        M 1 Reply Last reply Reply Quote 0
        • M
          Mighty23 @meto396
          last edited by

          @meto396 Are you using filmstrip images? If yes, double check size and number of frames.
          For smooth and relevant animation, if you're using Lottie, check the number of frames in the animation.

          Free Party, Free Tekno & Free Software too

          1 Reply Last reply Reply Quote 0
          • Steve LydfordS
            Steve Lydford
            last edited by

            It could be that you are toggling the button "on and off", depending on the state at the start. Try adding something like this at the top of your button callbacks:

            if(!value)
              return;
            
            M 1 Reply Last reply Reply Quote 0
            • M
              meto396 @d.healey
              last edited by

              @d-healey my codes for the buttons look like this:

              const var Panel1 = Content.getComponent("Panel1");
              const var Button1 = Content.getComponent("Button1");
              
              inline function onButton1Control(component, value)
              {
              	Panel1.showControl(value);
              };
              Button1.setControlCallback(onButton1Control);
              
              Content.getComponent("Button1").setControlCallback(onButton1Control);
              
              1 Reply Last reply Reply Quote 0
              • M
                meto396 @Steve Lydford
                last edited by

                @Steve-Lydford tried this but now I couldn't click nothing anymore

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

                  @meto396 Is it a momentary button?

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

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    meto396 @d.healey
                    last edited by

                    @d-healey no all of these buttons where I have this problem are opening panels or images

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

                      @meto396 I don't see anything wrong in that code. Make a new test project with one button and one panel and see if the issue occurs there.

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

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

                      48

                      Online

                      1.7k

                      Users

                      11.7k

                      Topics

                      102.3k

                      Posts