How to keep a color in a fill() the same after mousePressed?
What would be the easiest and simplest way to keep the fill() the same after clicking (that's when it changes) and then unclicking, and leaving hover? In this project, I simply made a grid. When the mouse hovers over a specific rect (at x , y ) it changes color based on the state it is in. fill(50) is the default, fill(75) is when the mouse is hovering, and fill(100) is when the mouse clicks. But here when the mouse is unclicked it returns to hover fill until the mouse leaves the rectangle. Thanks. int cols, rows; int scl = 20; void setup() { size(400, 400); int w = 400; int h = 400; cols = w