Struct B
-
Make a structure
qqq
that holds a number A, a color C, and another number M. -
Make a draw handler that shows two solid circles, one with radius 10 centered at (A,10), and one with radius 15 centered at (100, M). Both circles are color C.
-
Moving the mouse always sets M to y.
- Make an example that you turn into a check-expect.
- Write code for this part of the job.
-
Clicking the mouse subtracts 10 from A.
- Make an example that turns into a check-expect.
- WRite code for this part of the mouse handler.
-
If you have not yet combined the two previous parts, do that now to create one mouse handler. A common problem is not handling unusual mouse events like “enter” (mouse enters the window).
An example of this is available in CPS or on YouTube.