title: how to check if you cklicked (with your mouse) in an defined area in python/pygame
body: <p>I want to check if you clicked in an defined area, for example an area from 0,0 to 400,40 (pixel coordinates). I have this:</p>
  
  <pre><code>x = 0
  y = 0
  (mouse_posx, mouse_posy) = pygame.mouse.get_pos()
  press = pygame.key.get_pressed()
  if mouse_posx &gt; x and mouse_posx &lt; x+400 and  mouse_posy &gt; y and mouse_posy &lt; y+40 and press != 0:
      function()
  </code></pre>
  
  <p>I get no error but it does nothing.
  Can someone tell me what i am doing wrong?</p>