(self, text, color=(255, 255, 255), seconds=2.0)
| 627 | self.surface = pygame.Surface(self.dim) |
| 628 | |
| 629 | def set_text(self, text, color=(255, 255, 255), seconds=2.0): |
| 630 | text_texture = self.font.render(text, True, color) |
| 631 | self.surface = pygame.Surface(self.dim) |
| 632 | self.seconds_left = seconds |
| 633 | self.surface.fill((0, 0, 0, 0)) |
| 634 | self.surface.blit(text_texture, (10, 11)) |
| 635 | |
| 636 | def tick(self, _, clock): |
| 637 | delta_seconds = 1e-3 * clock.get_time() |
no test coverage detected