MCPcopy Index your code
hub / github.com/geekcomputers/Python / draw_button

Function draw_button

Street_Fighter/src/main.py:122–128  ·  view source on GitHub ↗
(text, font, text_col, button_col, x, y, width, height)

Source from the content-addressed store, hash-verified

120
121
122def draw_button(text, font, text_col, button_col, x, y, width, height):
123 pygame.draw.rect(screen, button_col, (x, y, width, height))
124 pygame.draw.rect(screen, WHITE, (x, y, width, height), 2)
125 text_img = font.render(text, True, text_col)
126 text_rect = text_img.get_rect(center=(x + width // 2, y + height // 2))
127 screen.blit(text_img, text_rect)
128 return pygame.Rect(x, y, width, height)
129
130
131def victory_screen(winner_img):

Callers 3

main_menuFunction · 0.85
scores_screenFunction · 0.85
game_loopFunction · 0.85

Calls 1

rectMethod · 0.45

Tested by

no test coverage detected