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

Method __init__

PythonAPI/examples/manual_control_rss.py:412–429  ·  view source on GitHub ↗
(self, width, height)

Source from the content-addressed store, hash-verified

410
411class HUD(object):
412 def __init__(self, width, height):
413 self.dim = (width, height)
414 font = pygame.font.Font(pygame.font.get_default_font(), 20)
415 fonts = [x for x in pygame.font.get_fonts() if 'mono' in x]
416 default_font = 'ubuntumono'
417 mono = default_font if default_font in fonts else fonts[0]
418 mono = pygame.font.match_font(mono)
419 self._font_mono = pygame.font.Font(mono, 14)
420 self._notifications = FadingText(font, (width, 40), (0, height - 40))
421 self.help = HelpText(pygame.font.Font(mono, 24), width, height)
422 self.server_fps = 0
423 self.frame = 0
424 self.simulation_time = 0
425 self.original_vehicle_control = None
426 self.restricted_vehicle_control = None
427 self._show_info = True
428 self._info_text = []
429 self._server_clock = pygame.time.Clock()
430
431 def on_world_tick(self, timestamp):
432 self._server_clock.tick()

Callers

nothing calls this directly

Calls 2

FadingTextClass · 0.70
HelpTextClass · 0.70

Tested by

no test coverage detected