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

Method text

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

Source from the content-addressed store, hash-verified

38 self.selected = 1
39
40 def text(self):
41 # Text on the main menu
42 text_list = ["Main Menu", "Start", "Exit"]
43 # Size for the text
44 size_list = [70, 40, 40]
45
46 # Create text class and append to list
47 self.text_list = [
48 Text(text_list[i], size_list[i]) for i in range(len(text_list))
49 ]
50 # Select the first option
51 self.text_list[1].selected = True
52
53 def controls(self, event: pygame.event):
54 if event.type == pygame.KEYDOWN:

Callers 5

executeMethod · 0.95
open_urlMethod · 0.45
searchMethod · 0.45
make_cardsFunction · 0.45
create_instagram_postFunction · 0.45

Calls 1

TextClass · 0.85

Tested by

no test coverage detected