We had rollover assignments this week.
For the quad rollover, I experimented with using type and how to actually create the rollover. I introduced a new statement “&&” into my “if” statements. I’ll define one line of the draw.
if mouseX is less than half the width AND mouseY is less than half the height then:
rect(0, 0, width/2, height/2);
Create a rectangle that is half the width and half the height. This particular code makes a rectangle in the upper left corner. I then added a circle that would appear randomly and a line that would appear randomly.
My keys follow the same kind of format but I tried putting animation into it for a few of them. I used if statements inside the if statements. It felt a little crude but I didn’t fully understand functions as yet.