code: def handleEvent(self, eventObj):
          
          if not self.isEnabled:
              return False
  
          if eventObj.type not in (MOUSEMOTION, MOUSEBUTTONUP, MOUSEBUTTONDOWN) :
              # The dragger only cares about mouse-related events
              return False
  
          clicked = False
          if eventObj.type == MOUSEBUTTONDOWN:
              if self.rect.collidepoint(eventObj.pos):
                  self.dragging = True
                  self.deltaX = eventObj.pos[0] - self.rect.left
                  self.deltaY = eventObj.pos[1] - self.rect.top
                  self.startDraggingX = self.rect.left
                  self.startDraggingY = self.rect.top
  
          elif eventObj.type == MOUSEBUTTONUP:
              if self.dragging:
                  self.dragging = False
                  clicked = True
                  self.mouseUpLoc = (eventObj.pos[0], eventObj.pos[1])
                  self.rect.left = eventObj.pos[0] - self.deltaX
                  self.rect.top = eventObj.pos[1] - self.deltaY
                  self.setLoc((self.rect.left, self.rect.top))
  
  
          elif eventObj.type == MOUSEMOTION:
              if self.dragging:
                  self.rect.left = eventObj.pos[0] - self.deltaX
                  self.rect.top = eventObj.pos[1] - self.deltaY
              else:
                  self.mouseOver = self.rect.collidepoint(eventObj.pos)
  
          if clicked:
              if self.callBack is not None:
                  self.callBack(self.nickname)
  
          return clicked
docs: This method should be called every time through the main loop.
  
          It handles all of the dragging
  
          Parameters:
              | eventObj - the event object obtained by calling pygame.event.get()
  
          Returns:
              | False most of the time
              | True when the user finishes dragging by lifting up on the mouse.