HISE Logo Forum
    • Categories
    • Register
    • Login

    Look and Feel value display issue

    Scheduled Pinned Locked Moved Scripting
    7 Posts 4 Posters 402 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.
    • H
      hyperphonias
      last edited by

      Hello, recently i'm trying to spend more time in the gui conception for my plugins but i'm having an issue right over there.

      I can't see anymore the value of the knob.

      I tried something but when it compiles the value changes but when I rotate the knob the value doesn't change

      6a17e5ef-558c-491e-b8ba-056d3db5e487-image.png

      Here's the code that i added after the laf thing

      ba81da93-27b4-4a66-b318-56cf5615f477-image.png

      ChazroxC 2 Replies Last reply Reply Quote 0
      • ChazroxC
        Chazrox @hyperphonias
        last edited by

        @hyperphonias Whats your function? I think you're just missing a few things. Drop a snippet.

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

          @hyperphonias You could do this. Just write the .set("text" directly in the control callback for the knob. Thats unless you need it that way specifically. You're missing the name of your knob in the function (and a couple little things) which is why the knob isnt triggering the function. See below:

          After your LAF section, delete what you have there now and try this.

          const var ThresholdKnob = Content.getComponent("ThresholdKnob");
          const var LabelThreshold = Content.getComponent("LabelThreshold");
          
          inline function onThresholdKnobControl(component, value)
          {
          	if (value)
          	{
          		LabelThreshold.set("text", Math.round(value));
          	}	
          };
          Content.getComponent("ThresholdKnob").setControlCallback(onThresholdKnobControl);
          

          Can somebody tell me how to show the output in this format "00.00"?
          I only used Math.round to cut down the number of digits because its neater but I know its not ideal.

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @Chazrox
            last edited by

            @Chazrox

            myVar = 123.5678;
            myFixedVar = Math.round(myVar*100)/100;
            

            HISE Development for hire.
            www.channelrobot.com

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

              @Lindon Sweet. Thanks!

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

                @Chazrox Engine.doubleToString()

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

                ChazroxC 1 Reply Last reply Reply Quote 1
                • ChazroxC
                  Chazrox @d.healey
                  last edited by

                  @d-healey 🙏

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

                  14

                  Online

                  1.7k

                  Users

                  11.9k

                  Topics

                  103.6k

                  Posts