(screen, text)
| 146 | clock.tick(60) |
| 147 | |
| 148 | def drawText(screen, text): |
| 149 | font = p.font.SysFont("Helvitca", 32, True, False) |
| 150 | textObject = font.render(text, True, p.Color('Gray')) |
| 151 | textLocation = p.Rect(0, 0, WIDTH, HEIGHT).move(WIDTH/2 - textObject.get_width()/2, HEIGHT/2 - textObject.get_height()/2) |
| 152 | screen.blit(textObject, textLocation) |
| 153 | textObject = font.render(text, True, p.Color("Black")) |
| 154 | screen.blit(textObject, textLocation.move(2,2)) |
| 155 | |
| 156 | |
| 157 | if __name__ == "__main__": |