Can I ‘invert’ a bool?

You can get rid of your if/else statements by negating the bool’s value:

ruleScreenActive = !ruleScreenActive;

Leave a Comment