dropdown.py 文件源码

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

项目:tingbot-gui 作者: furbrain 项目源码 文件源码
def draw(self):
        (w, h) = self.size
        self.draw_button()
        triangle_size = self.style.button_text_font_size / 2
        self.text(self.selected[0],
                  xy=(5, h / 2),
                  size = (w-10-triangle_size,h),
                  align="left",
                  color=self.style.button_text_color,
                  font=self.style.button_text_font,
                  font_size=self.style.button_text_font_size)
        triangle_points = ((w-5, (h-triangle_size) / 2),
                           (w - 5 - triangle_size/2, (h+triangle_size) / 2),
                           (w - 5 - triangle_size, (h-triangle_size) / 2))
        pygame.draw.polygon(self.surface,
                            _color(self.style.button_text_color),
                            triangle_points)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号