caves.py 文件源码

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

项目:caves 作者: mikaelho 项目源码 文件源码
def setup_bottom_menu(self, buttons):
    bottom_menu_height = 40
    (_, _, w, h) = self.bg.bounds
    bottom_menu = EvenView(margin = 20)
    bottom_menu.flex = 'WT'
    bottom_menu.frame = (0, h - bottom_menu_height, w, bottom_menu_height)
    bottom_menu.background_color = 'white'
    self.bg.add_subview(bottom_menu)
    for icon, func in buttons:
      button = ui.Button(image = ui.Image.named(icon))
      button.action = func
      button.name = func.__name__
      button.tint_color = self.menu_color
      bottom_menu.add_subview(button)
    return bottom_menu
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号