is_toching = self.rect.collidepoint(mpos) if event.type == pygame.MOUSEBUTTONUP: self.mouse_up_event(mpos) if is_toching and event.button == 1: self.click_event(mpos)