Why text display for 2 seconds in pygame

落爺英雄遲暮 提交于 2020-07-10 03:15:24

问题


Text wchich I display is displaying for only around 2 sec. I want that it will display while I click to other area

elif msg[0:7] == 'YOU WIN' and Message_id == '200':
    print('You Win')
    textSurface = font.render('You Win', True, (0, 0, 0))
    largeText = pygame.font.Font('freesansbold.ttf', 115)
    TextSurf = pygame.font.render('You Win', True, (0, 0, 0))
    TextRect = textSurface.get_rect()
    TextRect.center = ((600 / 2), (700 // 2))
    surface.blit(TextSurf, TextRect)
    grid.draw(surface)
    pygame.display.flip()
    break

来源:https://stackoverflow.com/questions/62459547/why-text-display-for-2-seconds-in-pygame

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!