新手求解
pygame吧
全部回复
仅看楼主
level 3
fz小翔 楼主
import pygame
from pygame.locals import *
white =255,255,255
blue=0,0,200
pygame.init()
screen=pygame.display.set_mode((600,500))
myfont=pygame.font.Font(None,60)
textImage=myfont.render("hello pygame",true,white)
while true:
for event in pygame.event.get():
if event.type in (QUIT,KEYDOWN):
sys.exit()
screen.fill(blue)
screen.blit(textImage,(100,100))
pygame.display.update()
图中字体显示不出来
2016年11月16日 15点11分 1
level 8
textImage=myfont.render("hello pygame",true,white)
改成
textImage=myfont.render("hello pygame",True,white)
2016年11月17日 03点11分 2
谢谢 ,一会晚点我试试
2016年11月17日 11点11分
level 8
或者textImage=myfont.render("hello pygame",1,white)
1代表True
2016年11月17日 03点11分 3
谢谢
2016年11月17日 11点11分
level 8
如果你不用1,就记得用大写T
True
不能用true
2016年11月17日 03点11分 4
好的 ,谢谢
2016年11月17日 11点11分
改过之后就可以了
2016年11月17日 16点11分
1