Look and Feel value display issue
-
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
Here's the code that i added after the laf thing
-
@hyperphonias Whats your function? I think you're just missing a few things. Drop a snippet.
-
@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. -
myVar = 123.5678; myFixedVar = Math.round(myVar*100)/100;
-
@Lindon Sweet. Thanks!
-
@Chazrox Engine.doubleToString()
-