gui.py 文件源码

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

项目:PyBot 作者: Pentabyteman 项目源码 文件源码
def update(self, event):
        try:
            if not self.contains(*event.pos):
                if not self.focussed:
                    return
        except AttributeError:
            return
        if event.type == pygame.MOUSEMOTION:
            if self.contains(*event.pos):
                self.focussed = True
                self.mouse_entered()
            else:
                self.focussed = False
                self.mouse_left()
            self.mouse_moved(event)
        elif event.type == pygame.MOUSEBUTTONDOWN and event.button == 1:
            if self.contains(*event.pos):
                self.clicked(event)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号