我正在尝试制作游戏并且正在尝试渲染大量文本。当文本呈现时,其余文本会从屏幕上消失。有什么简单的方法可以让文本转到pygame窗口的下一行吗?
helpT = sys_font.render \
("This game is a combination of all of the trends\n of 2016. When you press 'Start Game,' a menu will pop up. In order to beat the game, you must get a perfect score on every single one of these games.",0,(hecolor))
screen.blit(helpT,(0, 0))
原文由 Daniel Maslia 发布,翻译遵循 CC BY-SA 4.0 许可协议
正如我在评论中所说;您必须分别呈现每个单词并计算文本的宽度是否扩展了表面(或屏幕)的宽度。这是一个例子:
结果