MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / set_text

Method set_text

scenario_runner/no_rendering_mode.py:234–239  ·  view source on GitHub ↗
(self, text, color=COLOR_WHITE, seconds=2.0)

Source from the content-addressed store, hash-verified

232 self.surface = pygame.Surface(self.dim)
233
234 def set_text(self, text, color=COLOR_WHITE, seconds=2.0):
235 text_texture = self.font.render(text, True, color)
236 self.surface = pygame.Surface(self.dim)
237 self.seconds_left = seconds
238 self.surface.fill(COLOR_BLACK)
239 self.surface.blit(text_texture, (10, 11))
240
241 def tick(self, clock):
242 delta_seconds = 1e-3 * clock.get_time()

Callers 1

notificationMethod · 0.80

Calls 1

renderMethod · 0.45

Tested by

no test coverage detected