(self, width, height)
| 410 | |
| 411 | class 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() |
nothing calls this directly
no test coverage detected