HISE Logo Forum
    • Categories
    • Register
    • Login

    Calculator Project

    Scheduled Pinned Locked Moved Scripting
    34 Posts 3 Posters 2.3k 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.
    • S
      Sawer
      last edited by

      Hello everyone!
      Screen Recording 2022-02-18 at 11.35.21.gif

      Trying to style this calculator here, I'm working on the customisation of the buttons.
      I just want to set an animation that once a number is pressed, a background pops up and scales itself while fading thru opacity, (just like website buttons).

      I'm currently running with 2 issues:

      1. As shown in the video , once the mouse is gone, the buttons background goes away but the buttons frame remains until I press another button.

      2. For the scaling and fading implementation, I've tried to set a Timer where the opacity of the background fades in 1000 milliseconds. It didn't work on the
        if(obj.down) functions/Conditional Statement. Also want to know if there is a way to scale the rectangle by x.

      Any Help is super appreciated. I'm so far happy of the improvements, just wanna add this little UX feature.

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

        @Sawer Is that individual buttons or are you using a panel? You should be using a panel really.

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

        S 2 Replies Last reply Reply Quote 0
        • S
          Sawer @d.healey
          last edited by

          @d-healey Yes, True. That's what I'm working on now. almost done!

          1 Reply Last reply Reply Quote 0
          • S
            Sawer @d.healey
            last edited by

            @d-healey
            Watched your "Panel Timers" Youtube video. Thanks soo much for this.
            I'm currently having problems on running the timer. This is the snippet. If

            HiseSnippet 1428.3ocsWrsaaaCUJMpn1aEXcXe.D9gAYfTG41ltgEzsV6D2kslTi3tt9VAsDsEQoIMHoRrWQ+m2ev14PIYIm3lkZfIjHSdtvyEdtogZULyXTZO+FuY4blm+WGLZozl1Okxkdmbjm+2FzKyZURxKj7YTKWI85sbN0XXId9924kHc9M10y872+ROpfJiYUf77dqhGydEeF2VAc3y+ctPLflvdCeVMpexyOIVI6qDpLPmtSPj2bZ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y+QyrYZYQ.wgMAdg+aBCoXrtXSEzn7Yk8N6TuSYXqwVIjthMfvWX21q+rpIqRdlxxdMzS.5.iBgbUTSlrQbXySsRHvpxa.cQ85OOig4YU6AlCj5uhPXBj0Gq4t2twZhy6kWiPk7DIGJdvJ1OPIRvwUv0WeHHuhgAfU+wIXONbtnBXUs9AXGwt.FrLeJoFAGwLe.5N4nc1b3VQhiaZcXue4LTXyCONH5f.3twaArvOADzxxEtAI.9taRwvq4yQTGx5iQfiFt9TDdiU5DldDTLp9Tv4POmlvyL0g6c8Q9fgMUIYBpc8IPwQsKPb0ovwQ6jFnzb8Qw+BFKM5FGK81phOHXH2FmtYcbmMnivM6+G5Xwv72O33ISfROUJ3tACd21N49+g3ymbY5oTqligUmkMaDzSLlARWBQcFLBaGL5NeeDtG8.iXxD2l+AdJP1E26WfraIRuYzXs58w4Ys3mKbOGDPmjtuNpQvo3dRWOWlLFkG0IxaF7kKuONFM+GBIbalmGsE773sfmmrE7bvVvyS2Bd9gsfme7F4A+nwWjYUEe3L.X3wtRZ99GKoPjkKJz6eAAGCS6
            

            The code is a little bit messy (Iteration purposes) but I've put some comments for more clarity. Any help is super appreciated.

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

              @Sawer What's the problem? Are you using develop branch?

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

              S 1 Reply Last reply Reply Quote 0
              • S
                Sawer @d.healey
                last edited by

                @d-healey Yes, I am.
                the problem is that when I click the panel, the Console says this "Accessing parameter reference outside the function call" So I do not really know where to place the parameter.

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

                  @Sawer You need to use a different variable name

                  0c7ce3a4-3560-47fe-9446-a939a1aa861c-image.png

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

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    Sawer @d.healey
                    last edited by Sawer

                    @d-healey Thanks so much man. It's working now.
                    Want to ask if its possible to ad in the same timer a state where the opacity also fades.. the issue is that the counter goes up to scale the background, but the opacity starts from 1 and goes to 0 with an interval of 0.1, while for the background is of 1.
                    Any Idea please?

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

                      @Sawer Divide by 10?

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

                      S 2 Replies Last reply Reply Quote 0
                      • S
                        Sawer @d.healey
                        last edited by

                        @d-healey Thanks . will try

                        1 Reply Last reply Reply Quote 0
                        • S
                          Sawer @d.healey
                          last edited by

                          @d-healey It works. Thanks!

                          1 Reply Last reply Reply Quote 1
                          • S
                            Sawer
                            last edited by

                            Screen Recording 2022-02-22 at 11.50.55.gif

                            Alright, almost at the finish line. Tried to implement the button animation by creating it from a panel. I'm having to issues:

                            1. Just like a normal button, when it's clicked and released , the background frame still remains until another button is pressed(maybe is because of the transparency)
                            2. Secondly, only one button(the last) can do the animation, the rest if clicked won't do anything even tho the counter works.

                            Am I missing something?
                            Any help is super appreciated! thanks.

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

                              @Sawer Your image is too tiny, I can't read any of the code. Post a snippet.

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

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

                              49

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              102.1k

                              Posts