Can I ‘invert’ a bool? February 27, 2023 by Tarik You can get rid of your if/else statements by negating the bool’s value: ruleScreenActive = !ruleScreenActive;