MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / display

Method display

projects/Space Shooter/main.py:28–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 self.selected = False
27
28 def display(self):
29 # Change the color if selected
30 color = (255, 0, 0) if self.selected else (255, 255, 255)
31 font = pygame.font.Font("SHPinscher-Regular.otf", self.size)
32 return font.render(self.text, True, color)
33
34
35class Menu:

Callers 3

objectsMethod · 0.45
textMethod · 0.45
objectsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected