LAF for Momentary Buttons?
-
When I set a button to momentary, the colours change. How do you set the LAF for the momentary states of a button? Thank you.
-
@clevername27 Check the
obj
passed into the function, there are multiple state bools that you can use (down
,over
,valueNormalized
). -
@clevername27 There's no
isMomentary
property in the LAF object so you need an external variable to get itreg isMomentary = button.get("isMomentary");
And draw your custom LAF accordingly.
Though keep in mind that using external variables in a custom LAF has never been recommended, although Christoph recently said that a safety was introduced so it shouldn't be an issue. At you own risk :)Solution 2:
Just make 2 custom LAF and assign them dynamically (I've never tried) -
@clevername27 @Christoph-Hart I might not have understood the question correctly if it's just for the clicking state then…
-
C clevername27 has marked this topic as solved on