title: pygame - What is the code for clicking on an image
body: <p>I'm adding a title screen to my game, and I want to add "play" button that will launch the main game when the user clicks it. </p>
  
  <p>I have everything set up, but I'm not sure what the command is to have the mouse interact with the play button image.</p>
  
  <p>First, I have the play button image loaded outside of the main loop</p>
  
  <pre><code>play = pygame.image.load("play.png").convert()
  </code></pre>
  
  <p>Then, I have it blit on the screen, with a rectangle behind it as a marker</p>
  
  <pre><code>play_button = pygame.draw.rect(screen, WHITE, [365, 515, 380, 180])
  screen.blit(play, [350, 500])
  </code></pre>