HISE Logo Forum
    • Categories
    • Register
    • Login

    How to use a simple fader cap image?

    Scheduled Pinned Locked Moved General Questions
    5 Posts 4 Posters 58 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.
    • dannytaurusD
      dannytaurus
      last edited by

      I'm using a vertical slider as a volume fader.

      I want to use a custom image for the fader cap but making a filmstrip seems a bit wasteful of both time and plugin resources.

      How do I implement a simple static fader cap image at the 'movement' point of the slider?

      I feel like this is going to be either [1] using LAF to draw the fader cap image at the value point, or [2] using CSS to draw the fader cap as a background image in one of the slider's pseudo elements - but I genuinely have no idea how to look this up in the docs or the API reference.

      Meat Beats: https://meatbeats.com
      Klippr Video: https://klippr.video

      d.healeyD ChazroxC 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @dannytaurus
        last edited by

        @dannytaurus LAF is the way I'd go

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

        1 Reply Last reply Reply Quote 1
        • ChazroxC
          Chazrox @dannytaurus
          last edited by Chazrox

          @dannytaurus I used LAF for the fader background, slider holes etc, then just g.drawImage in the same Laf function the fader cap PNG. It works.

          You have to declare you image like this:

          myLAF.loadImage("{PROJECT_FOLDER}3D Slider Black.png", "slider3d");

          then you can call it from your graphics api.

          The shadows behind the knob are also LAF.
          Drummy Knob Laf.gif

          Christoph HartC 1 Reply Last reply Reply Quote 1
          • ChazroxC Chazrox referenced this topic
          • Christoph HartC
            Christoph Hart @Chazrox
            last edited by

            @Chazrox Have you set the slider style to "Vertical"? this way you can click on the slider to move it to the actual position (from looking at your screen grab it looks like you're still using the Knob mode).

            ChazroxC 1 Reply Last reply Reply Quote 0
            • ChazroxC
              Chazrox @Christoph Hart
              last edited by Chazrox

              @Christoph-Hart I just went back and double checked. It is in fact in vertical mode.

              Screenshot 2025-06-21 at 2.02.57 AM.png

              get value part

              var y = a[3] - a[3] * obj.valueNormalized - (h + 4)  + (h + 6) * obj.valueNormalized;
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              23

              Online

              1.8k

              Users

              12.0k

              Topics

              104.2k

              Posts