UI.py 文件源码

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

项目:RPG 作者: LugosFingite 项目源码 文件源码
def _write(self, text: str, textColor: pygame.Color, size : ctypes.c_int16, x: ctypes.c_int16, y: ctypes.c_int16, center: bool = False):
        visual = pygame.font.SysFont("Candara", size)
        surface = visual.render(text, True, textColor)

        if not center:
            rectangle = surface.get_rect(x = x, y = y)
        else:
            rectangle = surface.get_rect(centerx = x, centery = y)

        self.MAIN.blit(surface, rectangle)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号