HISE Logo Forum
    • Categories
    • Register
    • Login

    panel value privacy?

    Scheduled Pinned Locked Moved Scripting
    27 Posts 2 Posters 1.1k 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.
    • ?
      A Former User @A Former User
      last edited by

      Yeah sorry but I don't think that method will help me, I need individual panels for each button because they're placed all over in different parent panels (hence the giant switch statement):

      Here you can see each button is correctly printing its own value, I just can't access it elsewhere

      I'm obviously missing something basic like some control callback or something to make the X.getValue() be visible to other functions, I just don't have enough experience with panels to identify it 😲

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

        I see what you're doing now. Use buttons instead of panels and create them in the interface designer. If you want to position them algorithmically you can do that in a loop, but using the interface designer is simpler than using factory functions (especially when they are not being placed in a logical pattern like a grid).

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

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @d.healey
          last edited by

          @d-healey damn okay, that was actually going to be my first plan but I decided i'd try and be smart and do it in a script :face_with_tears_of_joy:

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User
            last edited by

            can you use paintroutines with buttons? i need vectors

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @A Former User
              last edited by

              @iamlamprey Yes, via custom look and feel.

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

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User
                last edited by

                Ok figured out the panel situation

                Since I can use getValue within the factory method, I use this.data.name to find the index of the button array, then push that value into a new array buttonValues[] at the same index, which can be accessed anywhere :)

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @A Former User
                  last edited by

                  @iamlamprey I'm going to keep pushing you to buttons and LAF. It's a pita when you first start with it but once you get the hang of it you'll find it much easier to work with than panels.

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

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

                    Here's a really simple example

                    HiseSnippet 943.3ocsV8taaaCDmxwJnVatXEnO.B4S1.dBxIocCHXXN+wNvXMoFyYE6aczRmj4LEoGEcRMJ56xdT1ivdT1av1QIYK4M2fD2N8Iw6te79cGOdGGojAPZpTQrZbyx4.w5KsGuTnmd9TJSPFdAw5o1WQS0fxMWzYKmSSSgPhk0dWZDX0nNI66u99ynbpH.JEQHuQxBfWwRX5Roi58CLNe.MDtgkTw5i6MLPJNWxkKP9rmsOYNMXFMFtlZLqlMwZ+9gLsTMVS0PJZyYxvkimJuSja+aXorIbvrnKYLtQ4hImOkwCGsJVSIDq5iJi78xi7maeEKjsVdYF3qxT3VhnZNvp1lTp9FTp6GiRCj7PyF7QnmUE5UOmdOydbfhMWWpwvsuvdn.ObhnXZuJsxskT6jZ1mKQKDZuD5LXfBWrFQqW562w8E99sOooSSGL4mpc4zH2uysuHlI.u.Efg0kb4DJOeKekTN6TQ3..3sxgg.7TPLyTjLXgHPyjhVGDpn2ciLNlCmsPqkhC53FsRYbGW4jescSm22zwE+XQtsPAdxaAU6bQluXuHrN4TNuUdMQpWHUMKVAKMN1XAvSg6y9Ibr.pv3McUHd.cutppabWAO1KEz4Vr1v6lxzPgkwdlv9TNKV.g2.uSm4KM9SVD6QwzYG2CBviCEDdP6Sb9P6SVkVbkhqkZ30hVscduSCmO339uUEEsUclSXkjyA0VUatkotOfsDKRl.pNt2R4Kf0FhkdaVau+Cq1NHufqhgRwPAS+54Pw5xp+tao5mTTwZtlVvPzTc1sfmVbKHunhvvMogc9htjL5WsgD4Q.+vOM3G8oA+3s.+mFdAUSMcCJRHXRZNnzLyYg0EvsXq07dCMru.RmokyyxXIykBS5yZ+GPN6ckt7xdKq1j9NVndZofg8lBr3o5pRHOJmcXEm0Kohy98e4yuyNpZj0qZj8ae9c1wUb1eTMx9yzGjy9uc6wYNxvEbpdyAQlItEJvavazw2zUWjxzKqVC8HlN4u0oSa894CjtOydDSGLc67s1V3KVp++MeKl02zteTDDnKIac6A+7tNX+QPkeTtPyDwWQ0JFVyXe8hjw3Xj..YhPfyyPYV0L8.yW6aVaxLiAQX1h+F+JT10r1pPY2UJIIz.k7sA4MeLul3IYRPNIxdHUC7Ec3Z20MLss887II3ibdaPfIU70H22NlC2ALGsCXNdGv7hc.yK2ALeyNf4auWLl2Wd5BsLI+ZBJXT+rd+VV8ETrJKqhj7O.8o4CHB
                    

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

                    ? 1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User @d.healey
                      last edited by

                      @d-healey Cheers, I still have some png sliders so it'll still come in handy for that :)

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by

                        This was all just so I don't have to individually make factory presets 😎

                        1 Reply Last reply Reply Quote 1
                        • ?
                          A Former User
                          last edited by

                          @d-healey Going off your snippet, how would I separate elements for different L&F? Not all of my UI Buttons look the same

                          1 Reply Last reply Reply Quote 0
                          • ?
                            A Former User
                            last edited by

                            Ah just saw your post: https://forum.hise.audio/topic/2761/custom-look-and-feel-per-component/2

                            was this ever implemented?

                            d.healeyD 1 Reply Last reply Reply Quote 0
                            • d.healeyD
                              d.healey @A Former User
                              last edited by d.healey

                              @iamlamprey This is the PITA when you first start that I warned you about :p You can use the text property of the control to differentiate them. But what if I want to use the text property to show some text I hear you ask... then you have to get clever with substrings.

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

                              ? 1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User @d.healey
                                last edited by

                                @d-healey buttons can't have .data can they? sheesh

                                d.healeyD 1 Reply Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey @A Former User
                                  last edited by

                                  @iamlamprey Nope that's just a thing for panels.

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

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

                                    You don't just have to rely on the text property. Think outside the box, what other aspects can you use to distinguish one control from another...

                                    Do you have some really thin sliders and some wider ones, then all you need is an if statement to check the width and you can now tell them apart. I'm doing this in a script right at this moment ;)

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

                                    ? 1 Reply Last reply Reply Quote 0
                                    • ?
                                      A Former User @d.healey
                                      last edited by

                                      @d-healey Yeh nice, doesn't seem too bad :)

                                      1 Reply Last reply Reply Quote 0
                                      • ?
                                        A Former User
                                        last edited by

                                        This post is deleted!
                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        49

                                        Online

                                        1.7k

                                        Users

                                        11.7k

                                        Topics

                                        102.2k

                                        Posts