LAF ScriptSlider?
-
I've been late to the LAF-show, it's a real handy way to customise
gui items, I love it, thank you @Christoph-Hart !
I've read the documentation but I could not find anything about laf for ScriptSliders, is it implemented and I have missed it or...? -
@ulrik Yeah I implemented it a while ago and wrote some quick doc more recently but the doc is not yet online...
I’m not in front of my computer but I think I’ve made something like drawRotarySlider and drawLinearSlider if I’m not mistaken...
Also there are plenty of objects to handle the values, min, max, normalized, skew factor, suffix and others... I’ll be more specific when back home tonight... -
Custom LAF functions for Sliders
On top of the habitual:
bgColour itemColour1 itemColour2 textColour
You have access to all the following objects:
'drawRotarySlider' id text area value valueNormalized valueSuffixString suffix skew min max clicked hover
'drawLinearSlider' id text area valueSuffixString suffix skew style // Horizontal:2, Vertical:3, Range:9 clicked hover // Vertical & Horizontal style slider min max value valueNormalized // Range style slider valueRangeStyleMin valueRangeStyleMax valueRangeStyleMinNormalized valueRangeStyleMaxNormalized
NOTES:
The range Slider is a bit buggy if I remember well, so this is subject to change. I might add a separate LAF function for this one so please don't use Custom LAF for Range Sliders except for testing purposes... -
@ustk Wow, thank you I will test right away
-
@ustk waiting on this .......
-
@Jay it works already, just don’t use it for range sliders
-
@ustk I noticed the "obj.textColour" is not picked up inside laf code
HiseSnippet 1374.3ocsW0saaaCElJMJXwaYaEXO.bA6BmTGGaul1MDrUm+bQPyOd0ocCnnniQhxhKRjpTzIwcMWNf9Br2kc4d.1yvvdD186hrCIksjRcRCRQ0Es47K+NGd34bbWovillJjHmYOXXBE47It8FxUgaDRXbz1apYryZcv8hX9TIZ8gIjzTpOxw4VOTqgyrSiLe+6CVmDQ3dzbVHzSELO5NrXlJma21OhEE0g3SOfEWP661daOAeCQjX.fla41.kP7NhzmtGQq1TtHmY1xmoDxdJhhlhbldcg+vdghS3V8eJKkcXDUSzD0CbjkcGQjuFwZtnMBYQ9cGE0oHvKcyyA2xlC9B2cY9rw7yyEetQ.N2hh4CmotJ30rH7Zb8gmSA3MsEd21smmjknxknw1G6tMWQkAD3JnHrr5hl52mwc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+z42wA4rW6LbA788Eh11+7nn00wGnGEoVp79VZv8W+F572FxmetExEi4W9xWdtcY12Z4LXEQgud5Z48F0KKmI.dVTZAM8RX7TlZXwko+frL40Et21sKS4ENY7N0Dvq9E0GX7lsZ9btaED.8QyA6ztc9oO76gifd3JFu+tDkjA0Zt6MHtGTM3QAjv4zHcqKmozcGrzMzz5LSOXQCCgtPJSXSMsSlvliDhhIdRwK7rsWzK++QFN.l3leCzrt6powi6m35B6xfhgeSxK77zohk.rOYaZcCr4quA1b2afMqbCr4d2.at+Mvlu4JsQ+yAWafRDael.L5tkoutiyVbBTkYpHQ+O.ysLjO
-
@ustk I have to have the
var p = Content.createPath();
outside the
laf.registerFunction()
or it will not work, why is that?
-
@ulrik
textColour
isn't working with the stock slider either so this should have something to do with a bug in the slider wrapper somehow, it's not related to custom LAF. I'm checking if I can do something...Like for panels, I think you always need to create the path outside anyway
-
@ustk I see, no hurry, I can use "itemColour2" for my purpose, thank you!
-
@ustk where do I find the "skew" property, or Object as you say?
-
@ulrik The skew factor is not a public component property, it is calculated behind the scene. It's calculated to take the
middlePosition
property into account. Therefore you can only access it only fromobj
in the custom LAF
The skew is rarely necessary sincevalue
andvalueNormalized
should cover all the needs, but I had a special use case where I needed it, so it might be the reason I put it in the custom LAF I don't really remember to be honest... The associated function isgetSkewFactor
-
@ustk I understand, thank you!
-
@ulrik But What's Up With Pan-Pot?
-
@Natan what about it?
It's still a ScriptSlider and you can use the LAF on it as wellHere I've used the
laf.registerFunction("drawLinearSlider"...
for the gain, pan and voices, but I chose to add an extra Label to display the values
and if you want to have "L" "C" and "R" for the pan, you can easily script itHere I have
showTextBox Disabled
-
@ulrik Thank You
But I Mean, How The LAF Knobs Can Act In Pan Scenarios.
The One You Posted Above Goes From Left To Right.
Have You Made Any Left To Center, Center To Right Knobs?
Like This One:
-
@Natan Ok, no I have not tried to make that kind of Pan Knob, I guess you have to use 2 arcs and separate Pan from other LAF Knobs that use only 1 arc.
at the moment the property "mode" is not available as I can see @ustk ?
I think I would write "pan" as the suffix in the pan knobs, and use the
if (obj.suffix == "pan")
to separate them from other knobs, you could try it.
-
@ulrik Ok I tried, no need for 2 arcs in this one, however this lacks knob pointer
This will work as a regular Slider, for it to work as a pan slider you have to set the text and mode property to "Pan"
HiseSnippet 1438.3ocuWstaaaCEVJIpawaYHEXO.b9WNsNNxdMcCHKa14hKLZRpacZ6FJJJXjnr3hDo.EUa7FJvdQ56xdP1Cw9+9Q2gjVVRNNoEYWDJBJO23G+NGxywCEbORZJWXYu5oSRHV1etynILY39gXJyZvAfbmi50GMDyr1aRBNMk3aYau7CTpsWcEK82e9C6givLORgHKqmwodjinwTYgzgceHMJpO1mbJMtj02q6.ONaedDOCfxxNtVIXuywiImfUlsjik8sNzmJ4hQRrjjZYuxdb+IiB4ugYr+YzT5YQD0h1Vif.YD2mG4qPrRp09gzH+g4G4TKHJCKHfkMDvW5bL0mNSdAQrtVApvix7g8RWG7ZWFdtKDdtKBd1kf2JF3camQdBZhrPiBaely.ljHBvPJnLrL1Zsze7IN6yAKXxVw3yI8EvhYdz39ttMQa65twNqUasZPhHUhdMVfhvAncQGxFSYjVdBBbzdPD+LbjIrGw4m2i42mPhZXbU4TB3R9dY7YHVFN0fs1BgdBWhESPoQTehvHZP.JCPLBmhvpRMzHsxlnThDIIWHQXlOJl6SPIBdBQHojTjjipCFWesZ.PaIHioovIpeFySR4rF08E32X1LS3p2DEjqbbSD+rediZ+5Z0PvmB3BLaLA.OHGHoKPaZ9eT1NFaL+EfaJDRIXtOEyJbWK8QAAJHuKpSqsq3lxBrv6zPp24LHuAl31pyNUT9bpuLDTztkKr4cf+dmJ9LONNFxjnzLAAMgmgDDMYEBTDv2ekwpjVdQDrPy9U70CG4kEAIGsGDfcMmGTffGqk4kIDPND.WTFo.mfoyNjaV9Le2oHtrr6fZn3PcHJ3yM1RS0Whe.yffVu97XEseHw6bDMPG.c4vt6lm5U1.ZZbIUaXzMMAaHCrueOgWiWTISrEpSSzBkXRH2shxqTwKahfaQynmbFu3jjeZR.VViTMsjVnL+XXnquC4tQgtRGCCcoopipCf3XHc2BeVZguaryLieagejnTxb6w2+QrGOQsGyb4Ji7GJL6Wujq0JEfhz7fRIXZJJkGSjgT1XCxkg.uUJoWro+elhqTxuIbG1c6qHoaN2yQbuc9Zd0c0dvqjfoIsFSj6wyX9lTIFD+hNur5U2wsfswzmTazYiMKxsZbq.nA6gQQzjTxrvTnsp2TII1rrcgIpmM0OYmzbF7zuVlin4dV5CG7NUCduH5XFw+THO2.3lhX2DU2CdxQP7qeoGrPGQGGJYP4Poc6ApGs.O5Cm4Fuv8hs2NP+ouJp9GHwU+U4.TYwVET7UQd0dqxh7dGHN6Dtj7HVCn8QsUqAUyyqJHXg5TsEE7nHhXgpUiDItNGavxhOS0VzbKO2PX1fpCe3b0CeTd1HOSW5RFxYCXT4iRHrqZhIqos1UCmLEUfoR8nIewzQSLcasn9pgGG16jW8vS1yRC4YC78aOrq0SGb.VhyCDDygyZsCxNf7ZX7QyLOq5b.I8bIOQaabBmoPf85eDa6Ey1x0mzcRw.mOs6aTWvK.DtaHQUgUVR9kKP1s.IuWItnpVI8wO9wZop2r.d2QMlbo5dkIu6cu6uTlDS88iHC4oTURs7fxp4ZxcNt7X0+zuCygTZYWX9ljQzegTdx6zrf.5Ep70Qv70WZdQXpUtupSe0QYUyuOUgBMkmYTMWHCP4jx6x+34aWXwzGIbusyPpzKbw3coEfWnn5+Z7N8WKrlygAADOYAXWwo+O9u6OMXgP4I7LI7XHz7Wnx9NmjEOBJ47H.RXLn4HHydI0EVyZW0ZEyLB5VoW7d3apx1p01SU1NWoUL1Svekm4Zt52i7oZI.lX5eV1pNGqViZme61wAZHppzouxySQEaBXew9z4F3yWeC74d2.e19F3y8uA97M2.e91q0G0uPsWljGatl.BFdn9UVa6CYXnJSWQZ82.r+XSdB
If we could have LAF Slider to read the mode property it would be great :)
-
@ulrik With pointer
HiseSnippet 1530.3ocuWstaaaCEVNMZXwaYHEXO.b9WNsNNxt0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