HISE Logo Forum
    • Categories
    • Register
    • Login

    Panels and masking, or "how do I get MouseCallbacks to only be responsive to certain areas of a panel?" SVGpaths?

    Scheduled Pinned Locked Moved General Questions
    3 Posts 3 Posters 65 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.
    • andersnaessssA
      andersnaessss
      last edited by

      Hello.

      I have a beginner's general question about how to get MouseCallbacks to only be reactive to a portion of a panel, such as parallelograms or even non-rectangular areas. Is there a way to mask a panel? Or make a panel that is not made up by 90° rectangles?

      I want to implement some hover effects on the skewed squares seen in the picture below, such that they change color on event.hover.

      Is there a way to make (non-rectangular) SVGs set the boundaries of the MouseCallbacks?

      Screenshot 2025-01-15 at 15.25.55.png

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

        You'll need to use good ol' fashioned maths for this - https://forum.hise.audio/topic/11170/trapezoid-xy-pad

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

        1 Reply Last reply Reply Quote 0
        • ustkU
          ustk @andersnaessss
          last edited by ustk

          @andersnaessss There's also a Path.contains() method so if you have the path (even if you don't draw it) you can perform a check for mouse position

          EDIT: found the post: https://forum.hise.audio/topic/7986/how-to-detect-if-inside-ellipse/11?_=1736869127225

          Can't help pressing F5 in the forum...

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

          50

          Online

          1.7k

          Users

          11.7k

          Topics

          101.8k

          Posts