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

Method _init_hud_params

PythonAPI/examples/no_rendering_mode.py:273–285  ·  view source on GitHub ↗

Initialized visual parameters such as font text and size

(self)

Source from the content-addressed store, hash-verified

271 """Does nothing since it does not need to use other modules"""
272
273 def _init_hud_params(self):
274 """Initialized visual parameters such as font text and size"""
275 font_name = 'courier' if os.name == 'nt' else 'mono'
276 fonts = [x for x in pygame.font.get_fonts() if font_name in x]
277 default_font = 'ubuntumono'
278 mono = default_font if default_font in fonts else fonts[0]
279 mono = pygame.font.match_font(mono)
280 self._font_mono = pygame.font.Font(mono, 14)
281 self._header_font = pygame.font.SysFont('Arial', 14, True)
282 self.help = HelpText(pygame.font.Font(mono, 24), *self.dim)
283 self._notifications = FadingText(
284 pygame.font.Font(pygame.font.get_default_font(), 20),
285 (self.dim[0], 40), (0, self.dim[1] - 40))
286
287 def _init_data_params(self):
288 """Initializes the content data structures"""

Callers 1

__init__Method · 0.95

Calls 2

HelpTextClass · 0.70
FadingTextClass · 0.70

Tested by

no test coverage detected