uiImageButton alpha chanel color buildup if zoom is not 1.0

Home Forums General Programming uiImageButton alpha chanel color buildup if zoom is not 1.0

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #118026
    damien
    Participant
      • Topics: 15
      • Replies: 62
      • Total: 77

      Hi,
      I am working on a panel for the Ensoniq DP4 and I experienced a GUI bug with uiImagebuttons in PNG with transparency.
      If the zoom value is set to 1.0 everything is fine.
      If the zoom is different than 1.0 smaller or bigger, everytime you press an element the images colors builds up like if hundreds of the same image were overlaying each other. (always on the right side)

      please find attached the video of the bug:
      At the beginning the zoom ratio is set to 1 everything is fine, then I zoom out and the colors above alpha channels start to buid up on clicks.

      Is it something known? Is there a way to avoid that?
      I use macos mojave 10.14.6 and Ctrlr 5.3.198

      thanks 😉

      • This topic was modified 3 years, 12 months ago by damien. Reason: typo
      #118077
      dnaldoog
      Participant
        • Topics: 4
        • Replies: 480
        • Total: 484
        • ★★

        You could try

        panel:getCanvas():repaint() in a lua function attached to the button. Might be a bit expensive resource wise on a uiSlider etc though.

        The graphics design is exceptional. Very nice.

        :)

        #118105
        damien
        Participant
          • Topics: 15
          • Replies: 62
          • Total: 77

          Hi, thanks a lot! yes it’s going to be very realistic with all the features implemented (algo selection and tweaking, routing etc for every unit like a VST controlled external DSP.

          Well, I tried the repaint function in all my buttons methods when value changes but it doesn’t work, I still have the same issue with colors building up. It’s like if the refresh function is not happening.

          I tried to repaint only the modulator and I get an error :

          Error : Attempt to call method “repaint” (a nil value)

          this is the script “ModeTabsSelect” linked to the Select button as an exemple :

          
          ModeTabsSelect = function(mod, value)
          	panel:getComponent("ModeTabs"):setProperty ("uiTabsCurrentTab", 0, false)
          
          	panel:getModulatorByName("ViButComSelect"):repaint()
          end
          

          It should select a new tab and refresh the button but no it does not work.

          Can you please help with that, I am getting mad at it 🙂

          thanks a lot

          #118106
          dnaldoog
          Participant
            • Topics: 4
            • Replies: 480
            • Total: 484
            • ★★

            Well it was a long shot.

            I wasn’t confident it would work.

            I suppose it’s admitting defeat, but with the black background you wouldn’t need a transparent png, right?

            Another idea could be to use a transparent gif (may not look so good though) : I think it’s possible to use svg as well.

            #118107
            damien
            Participant
              • Topics: 15
              • Replies: 62
              • Total: 77

              Worst case scenario I’ll export the sprites again with the color tone of the background behind the light glow and the button shadows. It will probably do the trick.
              I’ll let you know
              thanks

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