Divide the canvas into 3 columns with rect()s. When you mouse over a column, it appears and stays until the next time you mouse over it again, at which point the column disappears. (Just get this working for one column.)
Gut reaction was that it needs a boolean variable to remember the state of the rectangle. If the state is ON, rectangle appears. And when mouse enters the rectangle, the state changes.
The rectangle is blinking because the when mouseX is greater than 400, the ON state keeps flipping. Therefore I cannot just use mouseX for the condition statement, it needs to remember a state.

| t | mouseX | state of rectangle |
|---|---|---|
| 1 | in | on |
| 1 | out | on |
| 2 | in | off |
| 2 | out | off |
| 3 | in | on |
| 3 | out | on |
The rectangle appears if:
Therefore I will need at least two boolean variables to remember the state of the above two things. And when both conditions are met, the rectangle appears.
Sequence of events:
I need boolean variables to remember the state of two things: