def handle_event(self, event):
""" Slider event handler
:param event: event to handle
"""
if not self.visible:
return
mouse_events = [pygame.MOUSEBUTTONUP, pygame.MOUSEBUTTONDOWN, pygame.MOUSEMOTION]
if getattr(event, "source", None):
self.event_source_local = False
else:
self.event_source_local = True
if event.type in mouse_events:
pos = event.pos
if not self.bounding_box.collidepoint(pos):
return
self.mouse_action(event)
elif event.type == USER_EVENT_TYPE:
self.user_event_action(event)
评论列表
文章目录