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
gui.py 文件源码
python
阅读 34
收藏 0
点赞 0
评论 0
评论列表
文章目录