Thursday, October 5, 2023

Filter

 

    

                                                                          *     *     *

Today was codemy's  Pygame Thursdays 2. Building on the code we had

from last week, we get to see how to tap into mouse clicks and mouse motion.

The player is the circle on the screen.

                                                              

Putting the below code in service. The circle gets dragged along by the mouse on the screen.

Mouse[0] is left mouse button, mouse[1] is the wheel, and mouse[2] is the right mouse button.

On a right click, the circle turns red, but only so long as the right button is down.

                                                                             


                                                                                   

                                                                           *     *     *


No comments: