def check(self):
for event in pygame.event.get():
if event.type == pygame.QUIT:
State.exit()
if event.type == pygame.MOUSEBUTTONDOWN:
self.events.append(GUI.LongClickEvent(event))
if event.type == pygame.MOUSEMOTION and len(self.events) > 0 and isinstance(self.events[len(self.events)-1], GUI.LongClickEvent):
self.events[len(self.events)-1].intermediateUpdate(event)
if event.type == pygame.MOUSEBUTTONUP and len(self.events) > 0 and isinstance(self.events[len(self.events)-1], GUI.LongClickEvent):
self.events[len(self.events)-1].end(event)
if not self.events[len(self.events)-1].checkValidLongClick():
self.events[len(self.events)-1] = self.events[len(self.events)-1].mouseUp
评论列表
文章目录