HISE Logo Forum
    • Categories
    • Register
    • Login

    Circle shaped button question

    Scheduled Pinned Locked Moved General Questions
    5 Posts 2 Posters 432 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
      mehmethand
      last edited by

      I made a circle shaped button using button LAF. As button object area is a rectangle ,clicking on that area makes button work. But I want the button to work only when it is clicked on the circle area. Is there a way to do this? Thank you.

      Untitled.gif

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

        @mehmethand You could use a panel (instead of the button) and only register the click when the cursor is within the circular area - trigonometry time.

        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
          mehmethand @d.healey
          last edited by

          @d-healey Thank you. I got the idea. But now another question how can I get the mouse coordinate inside a panel?

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

            @mehmethand https://docs.hise.audio/scripting/scripting-in-hise/scriptpanel.html#the-mouseevent-callback

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

            1 Reply Last reply Reply Quote 0
            • M
              mehmethand
              last edited by

              I managed to do what I want. Thank you David. Here is the snipset if needed.

              HiseSnippet 942.3ocsV02aaSDF+bZ81rggXR7AvZ+AxVrERJC1jFQTZZJKBZWzxnLIDZ5p8k3S87cd9N2tHT+Nu8I.ddNaO6rkMfHlUTRdd6te2yK+NOqPEyzZUAww6oqxYDmO0c9JoIcbJkKISOj37YtGS0FVQPkpCVkS0ZVBwwYmeBU33sKw97pe3.pfJiYspHjSU7X1uvy3lVsy1+m4BwQzD1S4Yc79d6OMVIGqDpR.O63NfjSiOmtjcBEcqmKw4ZSR3FUwbC0vzDmcOPkrZdp5RYk+mx07yDLTXHYNrPUpORIRPDiZIiS4hjYMmaMAVkYsYgcpxBeg6w7D9az2lM9bqgf1H5lOb5sN71YM3MrK7FzAda.RNcfztUP5VtyiK34lVKHd9D2oRn3rfBo8tPoxWRuW2ycrB7PZ5mQOmcTAH7lHB2avf6D.eE8PeeH0qMAWPKBlQkLQvnfl.WxLiUY4JIHDd6bz5swHr90WyLyfri4IpRCWxBWTJiMbkLbYj+e56sDcnplFV8it+YhRFr.fsEPivSXwlveG.B7wjx0398a7DSZXTqhGw3KSMgQ+Atwd7EAgMVNkBqVXTvnQACi78fsbi6YAKA2xq78XBMy2yeSNcYJ2zAYSDBdtl8eCbWsVp4XUolMlJDmAsxs4F1EPtDyOX9NczwTSZe8KJLgM+K7s1rudu6Zio+Ki9p+QeVEgX.SRoe+n2wIaYwpU2j8pBKVviOuJMYMWvxwBaXzC877uJ.dpOc3SyQIPIOQYXOVFZWW+q7CdaSKVrQaX6UgRHXEazLxMT7gBLTVlcFq3NPOK1O03HLvr9Tn66eJrKIQbU2dGGUxoRt4w4L46i5fTOh.+6WmdH0PwQ2Zcfe4rBCGgfygrK.dvpAYO2CY5yMpbqu0yUDmqarVuYyXN1AQ3vv70csibjW1xTdx9qZElt+kXoETbsY0rto1FxtZfNP0kM8gZjGaLVs0AeYviTWvJ.V42gwA35TIkBpYcBPj0u1.TOVi0AYVjZtYU2aE9eiU7eKDuk6LtINcyXr2FvHT09Xfw56Rto6jEK.NtV.tq6QO6iyEGjJV3k.EQAGZXbOoLaNPsEyfcWBcQ37fSOrysRd.JiYf4LYhU3ufmZiCQYmZiCaLRxnwEpmGWMEh2VcCqF.SR6E0dvaL.xACI1ISHN2A8GPxfKNedbLd7uKLLs4X1aKh4a1hXt2VDy2tEw7caQL2eKh4AevXv2Y4GKMprpwAPwrIV5JGmIRJzYY6BI+8mZkr8
              
              1 Reply Last reply Reply Quote 1
              • First post
                Last post

              12

              Online

              1.7k

              Users

              11.8k

              Topics

              102.6k

              Posts