travel_display.py 文件源码

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

项目:stellarmagnate 作者: abadger 项目源码 文件源码
def handle_new_destinations(self, locations):
        """Update the destination list when the ship can move to new places"""
        self.listwalker.clear()
        self.keypress_map = IndexedMenuEnumerator()
        #for idx, location in enumerate(locations):
        for location in locations:
            prefix = self.keypress_map.set_next(location)
            button = IndexedMenuButton('({}) {}'.format(prefix, location))
            self.listwalker.append(urwid.AttrMap(button, None, focus_map='reversed'))
            urwid.connect_signal(button, 'click', partial(self.handle_button_click, location))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号