HISE Logo Forum
    • Categories
    • Register
    • Login

    Hover on Button or Slider ??

    Scheduled Pinned Locked Moved General Questions
    6 Posts 3 Posters 575 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.
    • M
      mehmethand
      last edited by

      Hi, I have a button and a slider inside a panel. What I want to do is to change the panel color when the mouse is over the button or slider. I searched and couldn't find any information. Is it possible to do this?

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

        @mehmethand You can do it if you are styling the control with look and feel

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

        M 1 Reply Last reply Reply Quote 0
        • M
          mehmethand @d.healey
          last edited by

          @d-healey thank you David. I'm not using look and feel. I have filmstrips for slider and button. So LAF is the only way for this operation I think.

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

            @mehmethand You might be able to do it by running a timer and calling Content.getComponentUnderMouse()

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

            M 1 Reply Last reply Reply Quote 0
            • M
              mehmethand @d.healey
              last edited by

              @d-healey Thank you so much. I tried timer and calling Content.getComponentUnderMouse(). It is working great.

              Matt_SFM 1 Reply Last reply Reply Quote 1
              • Matt_SFM
                Matt_SF @mehmethand
                last edited by

                @mehmethand you can combine laf + images :

                	const knobImage = Content.createLocalLookAndFeel();
                	knobImage.loadImage("{PROJECT_FOLDER}image.png", "img");
                	
                	knobImage.registerFunction("drawRotarySlider", function(g, obj)
                	{
                		var a = obj.area;
                		var offset = 100.0; // size of 1 image in px
                
                		g.drawImage("img", a, 0, Engine.doubleToString(obj.value*100.0*offset, 2));
                	});	
                

                Although it only works with linear values. If you use non-linear knob modes, it gets messed up.

                Develop branch
                Win10 & VS17 / Ventura & Xcode 14. 3

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

                16

                Online

                1.7k

                Users

                11.9k

                Topics

                103.7k

                Posts