Python pygame添加文字窗口的方法
1、首先,要定义模块pygame,并初始化pygame.display:import pygamepygame.display.init()

3、然后,定义函数:def drawText(content): pygame.酆璁冻嘌font.init() font = pygame.font.Font("msyhbd.ttf",58)pygame.font.Font(字体,大小)

5、然后,调用函数drawText。win.blit(drawText(" Hi ! 龙市唐川 "),(5, 190))pygame.display.update()并更新显示
