curses_ui.py 文件源码

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

项目:huhamhire-hosts 作者: jiangsile 项目源码 文件源码
def sub_selection_dialog_items(self, pos, i_pos, screen):
        """
        Draw items in `Selection Dialog`.

        :param pos: Index of selected item in `Configure Setting` frame.
        :type pos: int
        :param i_pos: Index of selected item in `Selection Dialog`.
        :type i_pos: int
        :param screen: A **WindowObject** which represents the selection
            dialog.
        :type screen: WindowObject
        """
        # Set local variable
        normal = curses.A_NORMAL
        select = normal + curses.A_BOLD
        for p, item in enumerate(self.settings[pos][2]):
            item_str = item if pos else item["tag"]
            screen.addstr(1 + p, 2, item_str,
                          select if p == i_pos else normal)
        screen.refresh()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号