main_menu.py 文件源码

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

项目:team-brisket-pyweek21 作者: AjaxVM 项目源码 文件源码
def handleEvents(self, events):
        for event in events:
            if event.type == pygame.QUIT:
                self.doQuit()
                return
            elif event.type == pygame.KEYDOWN:
                if event.key == pygame.K_ESCAPE:
                    self.doQuit()
                    return

                elif event.key == pygame.K_DOWN:
                    self.current_option += 1
                    if self.current_option >= len(self.options):
                        self.current_option = 0
                elif event.key == pygame.K_UP:
                    self.current_option -= 1
                    if self.current_option < 0:
                        self.current_option = len(self.options)-1
                elif event.key == pygame.K_RETURN:
                    self.currentOptionExecute()
                    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号