【发布时间】:2015-12-11 22:47:56
【问题描述】:
您好,我希望在 pygame 屏幕上添加一些文本。我的文字是在单词 recommened 之后有/包含一个换行符。
posX = (self.scrWidth * 1/8)
posY = (self.scrHeight * 1/8)
position = posX, posY
font = pygame.font.SysFont(self.font, self.fontSize)
if text == "INFO":
text = """If you are learning to play, it is recommended
you chose your own starting area."""
label = font.render(text, True, self.fontColour)
return label, position
return 给出 blit 的表面和位置。
我已经尝试使用三引号方法来包含空格,使用 \n。 我不知道我做错了什么。
【问题讨论】:
标签: python-3.x pygame