slider.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:Peppy 作者: project-owner 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号