title: If you press anywhere on the screen, it displays the message
body: <p>First and foremost, this isn't my code.(Just in case I need to say this.)
  I copied this code to understand how pygame works, however, the code should only print 'Hello' when you press the button, and the code prints the message if you press anywhere on the window created. Copy the code to see what I mean.</p>
  <pre><code>win = pygame.display.set_mode((640,480))
  
  class button():
      def __init__(self, color, x,y,width,height, text=''):
          self.color = color
          self.x = x
          self.y = y
          self.width = width
          self.height = height
          self.text = text
  
  def draw(self,win,outline=None):
      #Call this method to draw the button on the screen
      if outline:
          pygame.draw.rect(win, outline, (self.x-2,self.y-2,self.width+4,self.height+4),0)
          
      pygame.draw.rect(win, self.color, (self.x,self.y,self.width,self.height),0)
  
  def isOver(self, pos):
      #Pos is the mouse position or a tuple of (x,y) coordinates
      if pos[0] &gt; self.x and pos[0] &lt; self.x + self.width:
          if pos[1] &gt; self.y and pos[1] &lt; self.y + self.height:
              return True
  
      return False
  
  def redrawWindow():
       win.fill((255,255,255))
       greenButton.draw(win, (0,0,0))
  
  run = True
  greenButton = button((0,255,0), 150, 225, 250, 200, 'click me :')
  while run:
       pygame.mixer.init()
       redrawWindow()
       pygame.display.update()
  
   for event in pygame.event.get():
        pos = pygame.mouse.get_pos()
  
        if event.type == pygame.QUIT:
             run = False
             pygame.quit()
             quit()
  
        if event.type == pygame.MOUSEBUTTONDOWN:
             if greenButton.isOver:
                  print('Hello')
  
        if event.type == pygame.MOUSEMOTION:
             if greenButton.isOver(pos):
                  greenButton.color = (255,0,0)
             else:
                  greenButton.color = (0,255,0)
  </code></pre>
  <p>The isOver funstion should be working, but it doesn't. Anyone see the problem in the code?</p>