HISE Logo Forum
    • Categories
    • Register
    • Login

    Click outside = Close panel - How ?

    Scheduled Pinned Locked Moved General Questions
    58 Posts 6 Posters 2.6k 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.
    • d.healeyD
      d.healey @lalalandsynth
      last edited by

      @lalalandsynth You'd need to make the panel cover the entire screen and handle it in the click event.

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

      1 Reply Last reply Reply Quote 1
      • Matt_SFM
        Matt_SF @lalalandsynth
        last edited by

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

        Develop branch
        Win10 & VS17 / Ventura & Xcode 14. 3

        lalalandsynthL 1 Reply Last reply Reply Quote 1
        • lalalandsynthL
          lalalandsynth @Matt_SF
          last edited by

          @matt_sf So would I make a panel that covers entire screen where I place the button (that opens the panel) and when clicked outside the button it closes the panel ?
          If so , how do I make the distinction between opened and closed , as in If the panel is closed and I click outside the button area I dont want it to open .

          If I am making sense ?

          ustkU Matt_SFM 2 Replies Last reply Reply Quote 0
          • ustkU
            ustk @lalalandsynth
            last edited by

            @lalalandsynth the button has to be placed normally.
            But the popup has to be in the transparent fullsize panel that also has mouse CB.
            This way you just have to hide the transparent panel either you are clicking in it or in the popup

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

            1 Reply Last reply Reply Quote 0
            • Matt_SFM
              Matt_SF @lalalandsynth
              last edited by

              @lalalandsynth you can check if the menu is open or not if you want but it's not necessary since you'll 'only close' it when the panel is clicked

              HiseSnippet 919.3ocsVstaSCCE1tsdPBvDHwCPD+JSBlZgwEIzDk0sgpfsUQgIj3GSdItql4XWE6LnBMIDuB7BwiDuAvw4RS5nsaTIxOp54x247kiOmiSuXU.SqUwHry6FOhgv2jzerzLryPJWh5tMBuJYOp1vh8xTs03QTslEhv35uxp.6z.k97qWrEUPkArRUH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& Xcode 14. 3

              lalalandsynthL ustkU 2 Replies Last reply Reply Quote 1
              • lalalandsynthL
                lalalandsynth @Matt_SF
                last edited by

                @matt_sf I see , Cool !

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

                  @lalalandsynth @matt_sf nice, although I'd rather do it this way

                  HiseSnippet 911.3ocsVEtaaaCDlzIbMVasXEXO.B8Wp.cA1accEHnndwIYvXKIFycACX+nfgh1hMTjBRToyXn.C6IqOR8MX6HojEcmcQgwp9gg4c76tOd56NpokZFupRWhv8ewxBNB+EjYKUlrwYTgBM4DD9djyoUFdYr2zwKKnUU7TDFu2OZMf6uOx87tmeLURULdmID5Jsfw+YQtvzYc5neRHkmQS4uPjGr6GOZBSqFqk5ZfO6QFfJnranK3WPsaqGAg+rSSEFc4LC0vqP38OVmtbVl90J+9uRTItVxsKFhlAAxa9LsL0xXqUz3LgLcZ64tBAQYZWUXOeU3qHmKREqr2UM9Rmi3NDg0Cbu0o2dqQuggzaP.81.kvATZeOktOYFqTTX57X4ymSlnfWNyoPYOjJ98h587djwZXGJyg4za3mUBKVgH4ICF7nX3mGdTTDT5qLw2RKiOt1XzpgwOKtE5BtYrNuPqfEIOnw+C.Tcfxr03xshw6dcHE5h5hshv40BHJRnjBEOddshYDZUrV0PAKxRsLg0B6QPfk07GF8mQ88o7vJn92tOuyihdyQQMQ3vJaRcdGSkxqAAWx6GdGGZiF2bttthuZysjJgeKjeWhCB8U1DlLmJqrockGVFUsfmlXohK5AGsKzF9kpDWjhdST766Z97M5qgqRd4Fca6zJ+P.ST04WyKCKf1MBxu00zjsqoCa4X92oAaTqlnDlKK3ps0HhZDBV8eCqfsZbp+60n98UPj.D48IMkSjix.0vtwH+5jSnFZaPf3A4nfWZDV5iOgeKLQx2R0mbBu5Fit.FtrR4Am3OhT9GqFa8WzQK6V76iPAQ5.ejtaaqKUwkt.c.wqmBhC7rLbwqEolrUFd6eOJiKVjYBs.ZPPa2nDqr4YrT.+K9RkbI5112LvfIb.oHaiT2g35411YazqFUPKgPDd.aOGn+6.KXToNsVRMqO+zdoQiCP.t1PK6fIUkvrL7Rk+2Fp9wRw6SlJLrrMywdafifT6SAGatJ5tjSmOmyLcDbexY+1ml6cP+ht1HTKNmZJEfLfbQc9L31XFGxtBzI1A.3d1VU+5Asccy3pT2h+AdZbNztF23bXqSTNkUpeIy2faur6.mEfSJ2878gO3.VG20WSFb3.TNbu6KYL6w+qgoGaFy2rCX91c.yi2ALe2Nf4I6.lueGv7zOHF6m77C0Fctuc.LL8T2LVL9TEETVNUH5eAfC0WyH
                  

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

                  lalalandsynthL Matt_SFM 2 Replies Last reply Reply Quote 0
                  • lalalandsynthL
                    lalalandsynth @ustk
                    last edited by lalalandsynth

                    @ustk This is cool , however, I lose access to anything under the the holder panel.
                    All sliders etc . I seem to recollect that was easily solvable , cant remember how ?
                    Can I not pass mousecallbacks through the holder panel or do I need to have the holder panel appear and disappear as well ?

                    ustkU 2 Replies Last reply Reply Quote 0
                    • ustkU
                      ustk @lalalandsynth
                      last edited by

                      @lalalandsynth In my snippet, you'll lose lower Z component access only when the menu is opened, which shouldn't be a problem, right?

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

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

                        @lalalandsynth The whole purpose of the holder is to handle the callback because you want to close the popup when clicking outside. Or there's something I don't get in what you want to do 🙂

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

                        lalalandsynthL 2 Replies Last reply Reply Quote 1
                        • lalalandsynthL
                          lalalandsynth @ustk
                          last edited by lalalandsynth

                          @ustk That is exactly right. I am trying to implement this into what I already have going , probably doing something wrong.

                          The holder panel is blocking all sliders on my main interface at all times.
                          ONly does that in your snippet while button is engaged.

                          ustkU 1 Reply Last reply Reply Quote 1
                          • lalalandsynthL
                            lalalandsynth @ustk
                            last edited by

                            @ustk Got it , silly mistake ! Thanks guys !

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

                              @lalalandsynth Note that you should also be able to use a custom laf with a standard combobox or panelPopup

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

                              1 Reply Last reply Reply Quote 1
                              • lalalandsynthL
                                lalalandsynth
                                last edited by

                                Works nicely!
                                Betra.gif

                                1 Reply Last reply Reply Quote 3
                                • Matt_SFM
                                  Matt_SF @ustk
                                  last edited by

                                  @ustk ah yes I used your way for an "About" panel popup in my last project.

                                  @ustk said in Click outside = Close panel - How ?:

                                  you'll lose lower Z component access only when the menu is opened, which shouldn't be a problem, right?

                                  You're right 👍

                                  Develop branch
                                  Win10 & VS17 / Ventura & Xcode 14. 3

                                  lalalandsynthL 1 Reply Last reply Reply Quote 0
                                  • lalalandsynthL
                                    lalalandsynth @Matt_SF
                                    last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • lalalandsynthL
                                      lalalandsynth
                                      last edited by

                                      In my project the holder panel is called ResizeMainPnl.
                                      When I drag my sizing panel into that panel it changes the color/contrast ?
                                      I cannot see why it would do that ?

                                      Color change.gif

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

                                        @lalalandsynth Why not use LAF as @ustk suggested?

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

                                        lalalandsynthL 1 Reply Last reply Reply Quote 0
                                        • lalalandsynthL
                                          lalalandsynth @d.healey
                                          last edited by lalalandsynth

                                          @d-healey well, mostly because I got this working at the moment. :)
                                          And I should be able to put these labels into a panel without it changing the color, would like to know why it does that. stupid mistake, fixed.

                                          And finally, I know nothing about LAF at the moment.
                                          Can I use that and have the 6 state png buttons , click outside panel to close etc?
                                          I thought it was only for svg.

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

                                            @lalalandsynth said in Click outside = Close panel - How ?:

                                            Can I use that and have the 6 state png buttons , click outside panel to close etc?

                                            You can use images in LAF but generally the point of LAF is to do everything with paint routines so it scales nicely and doesn't require any image files.

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

                                            lalalandsynthL 2 Replies Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            28

                                            Online

                                            1.8k

                                            Users

                                            12.1k

                                            Topics

                                            105.8k

                                            Posts