MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / set_text

Method set_text

PythonAPI/examples/automatic_control.py:339–344  ·  view source on GitHub ↗
(self, text, color=(255, 255, 255), seconds=2.0)

Source from the content-addressed store, hash-verified

337 self.surface = pygame.Surface(self.dim)
338
339 def set_text(self, text, color=(255, 255, 255), seconds=2.0):
340 text_texture = self.font.render(text, True, color)
341 self.surface = pygame.Surface(self.dim)
342 self.seconds_left = seconds
343 self.surface.fill((0, 0, 0, 0))
344 self.surface.blit(text_texture, (10, 11))
345
346 def tick(self, _, clock):
347 delta_seconds = 1e-3 * clock.get_time()

Callers 2

notificationMethod · 0.45
errorMethod · 0.45

Calls 1

renderMethod · 0.45

Tested by

no test coverage detected