dialog.py 文件源码

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

项目:eduActiv8 作者: imiolek-ireneusz 项目源码 文件源码
def layout_update(self):
        self.color = (255, 255, 255, 150)
        self.scheme = "white"
        if self.game_board.mainloop.scheme is not None:
            if self.game_board.mainloop.scheme.dark:
                self.scheme = "black"
                self.color = (0, 0, 0, 150)
        self.width = self.layout.game_w
        self.height = self.layout.game_h
        self.image = pygame.Surface([self.width, self.height], flags=pygame.SRCALPHA)
        self.image.fill(self.color)
        self.rect = self.image.get_rect()
        self.rect.topleft = [0, 0]
        self.img = pygame.image.load(os.path.join('res', 'images', self.img_src)).convert_alpha()
        self.img2 = pygame.image.load(os.path.join('res', 'images', self.img_src2)).convert_alpha()

        # img2 has the same size
        img_pos_x = self.img.get_rect(centerx=self.image.get_width() // 2)
        img_pos_y = self.img.get_rect(centery=self.image.get_height() // 2)
        self.img_pos = (img_pos_x[0], img_pos_y[1])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号