快速登录:  

Forum: General Discussion

话题: Custom Button lighting
Is there a simple way to invert/reverse the "light on" action of a custom button?

I have a few custom buttons that work flawlessly, and would love the lighting of the button to be reversed.
 

发表时间 Sat 29 Jan 22 @ 1:11 pm
Just include on/off on your script action like this:

Original mapping:
slip_mode


Inverted lighting:
slip_mode ? off & slip_mode : on & slip_mode
 

发表时间 Sat 29 Jan 22 @ 1:14 pm
locoDogPRO InfinityModeratorMember since 2013
or/also

slip_mode & param_invert
 

发表时间 Sat 29 Jan 22 @ 1:43 pm
Thank you Phantom and Locodog for the quick replies.. and love both of the tricks ... cool !

The scripts that I wish to change the light action for are.... let me give you an example.

Button to reset all gain to zero for all decks.
deck all gain 50%

this custom button is ON when everything is as it should be, and OFF when it needs attention. Would like it to be ON when one of the gains is Non-zero to draw attention to it.

is there a way to reverse this lighting action simply, without taking into account all the 4 factorial possible combinations?

The original script works perfectly and simply, only, with lights reversed... Light is ON when all decks are have zero gain, and OFF if any one of the gains is non-zero. The logic is right, and lighting is reversed.

and attempting to reverse the light action with the suggested methods, results with logic that I do not want.. Light off unless ALL 4 decks have non-zero gain. Would like the light to be on if any one of the decks is non-zero.

Maybe I should just get used to the the light on .. and know that I need to do something when its OFF.

 

发表时间 Sat 29 Jan 22 @ 1:58 pm
locoDogPRO InfinityModeratorMember since 2013
param_equal `deck 1 gain 50% && deck 2 gain 50% && deck 3 gain 50% && deck 4 gain 50%` 1 ? off : on
 

发表时间 Sat 29 Jan 22 @ 2:13 pm
wow ! thank you Locodog.. very clever .. woot !

You Rock !
 

发表时间 Sat 29 Jan 22 @ 2:24 pm