Image button (press and hold)

Home Forums General Programming Image button (press and hold)

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #6943
    Bomma72
    Participant
      • Topics: 20
      • Replies: 68
      • Total: 88

      Hi, is there a way to use the image button so that when I press it down it will continue to fire so to speak.

      For instance if I were to an raise volume button so that when you push it down the volume would continue to raise.

      I looked in the settings but I didn’t see it.  Should i be using the timer for this?  If so is there and example of the timer anywhere?

      Maybe a while loop connected to the button in momentary mode?

      Thanks!

      #6945
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        Yes you need a timer in a loop. That needs lua no doubt. In the example panels there is an animation demo that uses timers and moves stuff around on the screen, that can be a starting point.

        #6963
        Bomma72
        Participant
          • Topics: 20
          • Replies: 68
          • Total: 88

          OK, gonna give it a shot tonight.

          #7007
          Bomma72
          Participant
            • Topics: 20
            • Replies: 68
            • Total: 88

            OK I took a look at this.  I think I get how the timer works, however is there a button property such as pressed, Released or down, up.  I am using the Momentary mode and I was hoping it would work like when I press and hold the button down it would be set to 1 but when I released it it would go back to 0.  That way the button could work like some scroll buttons on synths where while you hold the button down it scrolls through options.

            However it doesn’t seem to work this way, so i am wondering if there is a property I can check to see if the button is down.

            Let me know if you get what I am asking for, or if it doesn’t make sense I will try to explain it better.

             

             

            #7035
            Bomma72
            Participant
              • Topics: 20
              • Replies: 68
              • Total: 88

              Anyone have any luck with what I am describing?

              #7038
              dasfaker
              Keymaster
                • Topics: 80
                • Replies: 793
                • Total: 873
                • ★★★

                Use a uiCustomComponent, there you can assign a script for every mouse state.

                #7042
                Bomma72
                Participant
                  • Topics: 20
                  • Replies: 68
                  • Total: 88

                  OK I will give that a try.

                  #7052
                  atom
                  Keymaster
                    • Topics: 159
                    • Replies: 2945
                    • Total: 3104
                    • ★★★★★

                    I’ll try do add some functionality to normal buttons so that they work this way. But you must remind me of that, i got a lot of stuff pending.

                    #7060
                    Bomma72
                    Participant
                      • Topics: 20
                      • Replies: 68
                      • Total: 88

                      Well if I can make the custom component work then I would be fine with that, so really no rush.

                      #7083
                      Bomma72
                      Participant
                        • Topics: 20
                        • Replies: 68
                        • Total: 88

                        Hey tried this last night and got it to work.  It requires sticking the custom component in front of the actual button and then using lua change the button status via the custom component but it works great.  Also making the button inactive.

                        Thanks for all the help.

                        #7614
                        Bomma72
                        Participant
                          • Topics: 20
                          • Replies: 68
                          • Total: 88

                          Hey atom,

                          you said to remind you.

                          #7619
                          atom
                          Keymaster
                            • Topics: 159
                            • Replies: 2945
                            • Total: 3104
                            • ★★★★★

                            I added something that you might find useful, check out the latest nightly and the Repeat and RepeatRate properties for a uiButton or uiImageButton

                            #7649
                            Bomma72
                            Participant
                              • Topics: 20
                              • Replies: 68
                              • Total: 88

                              OK cool, thanks.

                              #7865
                              Bomma72
                              Participant
                                • Topics: 20
                                • Replies: 68
                                • Total: 88

                                Hey Atom, does this also go for the OS X, version as well.  I couldn’t find it.

                                 

                                #7892
                                atomix1040
                                Participant
                                  • Topics: 1
                                  • Replies: 4
                                  • Total: 5

                                  the mac build is not up to date.

                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • The forum ‘Programming’ is closed to new topics and replies.
                                There is currently 0 users and 98 guests online
                                No users are currently active
                                Forum Statistics
                                Threads: 2,495, Posts: 17,374, Members: 77,605
                                Most users ever online was 12 on January 22, 2019 3:47 pm
                                Ctrlr