Is it possible to use an if-then statement in a binding?
Is it possible to use an if-then statement in a binding? I’m trying to make a binding that applies only under certain conditions.
]]>
« Pierre Hébert (Previous Post)
(Next Post) It’s possible to set a shadow for text, so I suppose it doesn’t cost much cpu/battery. »
< ![CDATA[
Yes
Little example for changing coloir on day names
if ($ll_day_name == ‘lundi’){
return 0xffffaa00;}
else if ($ll_day_name == ‘jeudi’) {
return 0xffff00e0;}
else if ($ll_day_name == ‘mercredi’) {
return 0xffff0000;}
else {return 0xffffffff ;
}
]]>
< ![CDATA[
Or
$ll_day_name in {samedi:0, dimanche:0} ? 0xff00ff00 : 0xffffff00
]]>
< ![CDATA[
Ahhh!! Awesome. I just couldn’t get the syntax right apparently. Thanks a lot 🙂
]]>