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

Method _init_hud_params

scenario_runner/no_rendering_mode.py:294–304  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

292 pass
293
294 def _init_hud_params(self):
295 fonts = [x for x in pygame.font.get_fonts() if 'mono' in x]
296 default_font = 'ubuntumono'
297 mono = default_font if default_font in fonts else fonts[0]
298 mono = pygame.font.match_font(mono)
299 self._font_mono = pygame.font.Font(mono, 14)
300 self._header_font = pygame.font.SysFont('Arial', 14, True)
301 self.help = HelpText(pygame.font.Font(mono, 24), *self.dim)
302 self._notifications = FadingText(
303 pygame.font.Font(pygame.font.get_default_font(), 20),
304 (self.dim[0], 40), (0, self.dim[1] - 40))
305
306 def _init_data_params(self):
307 self.show_info = True

Callers 1

__init__Method · 0.95

Calls 2

HelpTextClass · 0.85
FadingTextClass · 0.85

Tested by

no test coverage detected