gui.py 文件源码

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

项目:Grating_Advanced_Simulation_Platform 作者: GratingLaboratories 项目源码 文件源码
def sel_handler(self):
        if self.event.key == K_q:
            if self.platform.focus in self.current_selection:
                pos = self.current_selection.index(self.platform.focus)
                index = (pos + 1) % len(self.current_selection)
                self.platform.focus = self.current_selection[index]
            elif len(self.current_selection) > 0:
                self.platform.focus = self.current_selection[0]
            else:
                self.platform.focus = None
        elif self.event.key == K_e:
            if self.current_selection == self.platform.operands:
                self.current_selection = self.platform.operators
            elif self.current_selection == self.platform.operators:
                self.current_selection = self.platform.operands
            else:
                logging.critical("Selection error!")
        else:
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号