HISE Logo Forum
    • Categories
    • Register
    • Login

    Broadcaster Mouse Events - remove double click?

    Scheduled Pinned Locked Moved Scripting
    12 Posts 2 Posters 602 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.
    • DanHD
      DanH @d.healey
      last edited by

      @d-healey Thanks currently I only have this in the callback:

      if(event.drag || event.clicked  || event.hover)
      

      Do I want a

      if(event.doubleclick)
      {
           ///Nothing Here
      }
      

      as well?

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

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

        @DanH

        Do the opposite and your code will be simpler.

        if (!event.drag && !event.clicked && !event.hover)
            return;
        
        // Put all your other stuff here
        
        

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

        DanHD 1 Reply Last reply Reply Quote 0
        • DanHD
          DanH @d.healey
          last edited by

          @d-healey Not sure I follow... do you mean like this?

          eqWatcher.addListener("RefreshFunction", "sets the table data from FloatingTile12", function(component, event)
          {
              if(event.drag || event.clicked  || event.hover)
              {
                  for (k = 0; k < numOfNodes; k++)
          		{
          			//stuff happens
          
          		}
          		}
          		
          if (!event.drag && !event.clicked && !event.hover)
          {
          	return;
          }
          
          });
          

          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
          https://dhplugins.com/ | https://dcbreaks.com/
          London, UK

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

            @DanH

            Instead of saying if this do this, say if not this don't do anything. It simplifies the code.

            So in your case:

            eqWatcher.addListener("RefreshFunction", "sets the table data from FloatingTile12", function(component, event)
            {
                if (!event.drag && !event.clicked && !event.hover)
                    return; // This means the function will exit here
            
                for (k = 0; k < numOfNodes; k++)
                {
                    // stuff happens
                }
            });
            

            This is a good video about the principle:
            https://youtu.be/CFRhGnuXG-4?si=jDgeQCcN_yienHej

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

            DanHD 2 Replies Last reply Reply Quote 0
            • DanHD
              DanH @d.healey
              last edited by

              @d-healey Oh I see 😆 Thanks!

              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
              https://dhplugins.com/ | https://dcbreaks.com/
              London, UK

              1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @d.healey
                last edited by

                @d-healey Ok so double clicking is still allowed.... Possibly because all those conditions are still actually met when double clicking...

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

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

                  @DanH Try adding || event.doubleClick

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

                  DanHD 1 Reply Last reply Reply Quote 0
                  • DanHD
                    DanH @d.healey
                    last edited by

                    @d-healey said in Broadcaster Mouse Events - remove double click?:

                    || event.doubleClick

                    like this?

                    if (!event.drag && !event.clicked && !event.hover || event.doubleClick)
                    

                    If so it doesn't change behaviour

                    DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                    https://dhplugins.com/ | https://dcbreaks.com/
                    London, UK

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

                      @DanH Post a simple snippet

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

                      DanHD 1 Reply Last reply Reply Quote 0
                      • DanHD
                        DanH @d.healey
                        last edited by

                        @d-healey ok turns out disabling double click with the broadcaster wouldn't ever help but I managed to edit the source code to get the desired effect :)

                        Thanks for the help! Always learning :man_student:

                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                        https://dhplugins.com/ | https://dcbreaks.com/
                        London, UK

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

                        36

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.7k

                        Posts