mouse over UiImageSlider [SOLVED]

Home Forums General Programming mouse over UiImageSlider [SOLVED]

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #29536
    zeoka
    Participant
      • Topics: 73
      • Replies: 466
      • Total: 539
      • ★★★

      Hi
      is there a way to do a “mouse over” action on image sliders
      Since nearly rev1600 the imagesliders doesn’t change their image by LUA
      I still need to put the mouse over the component to change the image

      Can I replace mouse action by LUA lines ?
      Or please Atom could you check this “issue” ?

      Thank you

      • This topic was modified 9 years, 5 months ago by zeoka.
      #29545
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        You can’t, at least for now. I might add mouse events for all components, but there is a risk it might break some things so i need to be careful. But i’ll try my best.

        #29546
        zeoka
        Participant
          • Topics: 73
          • Replies: 466
          • Total: 539
          • ★★★

          Oh bad !
          Or can I repaint the whole panel ?

          May be is it possible to add on image sliders and buttons
          an IsPropertyChanged() methods and PropertyRepaint() or at panel level ?
          I think about “mouseOver” and may be not needed and complicated..

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

            I added a test property for all components, that will be triggered on a mouse move event, you can try if it will help you.

            This is a test because i need to find out if it won’t cause problems. I uploaded a nightly build for windows to test.

            #29551
            zeoka
            Participant
              • Topics: 73
              • Replies: 466
              • Total: 539
              • ★★★

              Thank you !
              I try

              #29552
              zeoka
              Participant
                • Topics: 73
                • Replies: 466
                • Total: 539
                • ★★★

                Sorry to make you lose your time
                i’have bad explained my problem
                actually I need my mouse is over the component to change the image
                That means the mouse over action on imageSliders does something that “repaint” the component so the mouse over method is not really useful or I miss something . I will check the ccp if by chance I can see something….

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

                  Within that method you can repaint your component using the repaint() method on it.

                  #29576
                  zeoka
                  Participant
                    • Topics: 73
                    • Replies: 466
                    • Total: 539
                    • ★★★

                    Yes Atom but what I mean it already does the repaint when the mouse is over.
                    I saw the cpp’s yesterday there is image ,there is component but not image slider
                    I wondered if may be you could write lines that repaint directly the property “uiImageButtonResource” or “uiImageSliderResource”
                    repaint the frame or repaint with new image I don’t know
                    this is what happened when my mouse is over the component
                    However “componentLuaMouseMoved” could be useful for other purposes

                    Attachments:
                    You must be logged in to view attached files.
                    #29582
                    zeoka
                    Participant
                      • Topics: 73
                      • Replies: 466
                      • Total: 539
                      • ★★★

                      “I still need to put the mouse over the component to change the image”
                      this is my bad English : in French must et need are the same word in this context 🙂

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

                        So were you able to repaint your component when you need to ?

                        Remember that any UI element in Ctrlr (panel, canvas, component) can be repainted individually. Also if you repaint a component holding more child components (like a group component that has sliders in it), you will repaint it and all it’s children. So repainting the entire panel is a bad idea because it will eat CPU (a lot of it).

                        #29855
                        zeoka
                        Participant
                          • Topics: 73
                          • Replies: 466
                          • Total: 539
                          • ★★★

                          I never got the repaint() with components
                          Only with graphics() and because you put the callback at a right place.
                          Is there some examples ?
                          ..I look at Look&feel panel…
                          My images resources are very big : there will be 16*1,4mb + 16*0,7 mb
                          If I could economize image loading and use 2 resources images instead of 32.
                          The better is use the knob base as image in my custom comp(can’t get it for now) and use look&feel sliders if I can repaint them to change circles colour
                          Many things to learn

                          #31130
                          zeoka
                          Participant
                            • Topics: 73
                            • Replies: 466
                            • Total: 539
                            • ★★★

                            Ok I’ve found finally how to repaint() the uiImageSlider
                            It is the child 0

                            `
                            myMethod2 = function(mod, value)

                            k = panel:getComponent(“modulator-3”)
                            cust = k:getChildComponent (0)

                            if value == 0 then
                            k:setPropertyString(“uiImageSliderResource”,”Knob1″)
                            else
                            k:setPropertyString(“uiImageSliderResource”,”Knob3″)
                            end
                            cust:repaint()
                            end
                            `

                          Viewing 12 posts - 1 through 12 (of 12 total)
                          • The forum ‘Programming’ is closed to new topics and replies.
                          There is currently 0 users and 48 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