component:setRepaintsOnMouseActivity not working

Home Forums General Using Ctrlr component:setRepaintsOnMouseActivity not working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44360
    dasfaker
    Keymaster
      • Topics: 80
      • Replies: 793
      • Total: 873
      • ★★★

      Hi Atom.

      I have two modulators, one over the other, and when the mouse enter or leaves the top modulator, the bottom one gets repainted. I don’t want this behavior, so I’ve used setRepaintsOnMouseActivity(false) with both components, but they are still repainted. Any idea?

      #44422
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        No idea why this happens. This might be because of how components are handled in ctrlr. I need to check if this method has any meaning in the current situation.

        #44466
        atom
        Keymaster
          • Topics: 159
          • Replies: 2945
          • Total: 3104
          • ★★★★★

          Have you tried setting this option to all components children, a CtrlrComponent is actualy a couple of components layered on top of each other, so if you set the flag only to the container it will not apply to it’s children.

          Try to do getNumChildren() and for each child of a component set this flag. See if that helps.

          #44476
          dasfaker
          Keymaster
            • Topics: 80
            • Replies: 793
            • Total: 873
            • ★★★

            Thanks Atom. It’s working with the sliders, combos and custom components present in my panel, but not with toggle buttons, they are still repainted on mouse enter/leave.

            function setRepaintOff()	
                 local n = panel:getNumModulators()
                 for a = 0, n-1 do
                      local b = panel:getModulatorByIndex(a):getComponent():getNumChildComponents()
                      local c = 0
                      for c = 0, b-1, 1 do
                           panel:getModulatorByIndex(a):getComponent():getChildComponent(c):setRepaintsOnMouseActivity(false)
                      end
                 end
            end
          Viewing 4 posts - 1 through 4 (of 4 total)
          • The forum ‘Using Ctrlr’ is closed to new topics and replies.
          There is currently 0 users and 75 guests online
          No users are currently active
          Forum Statistics
          Threads: 2,495, Posts: 17,374, Members: 77,605
          Most users ever online was 12 on January 22, 2019 3:47 pm
          Ctrlr