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

Function draw_bg

Street_Fighter/src/main.py:110–119  ·  view source on GitHub ↗
(image, is_game_started=False)

Source from the content-addressed store, hash-verified

108
109
110def draw_bg(image, is_game_started=False):
111 if not is_game_started:
112 blurred_bg = blur_bg(image)
113 blurred_bg = pygame.surfarray.make_surface(np.transpose(blurred_bg, (1, 0, 2)))
114 blurred_bg = pygame.transform.scale(blurred_bg, (SCREEN_WIDTH, SCREEN_HEIGHT))
115 screen.blit(blurred_bg, (0, 0))
116 else:
117 image = pygame.surfarray.make_surface(np.transpose(image, (1, 0, 2)))
118 image = pygame.transform.scale(image, (SCREEN_WIDTH, SCREEN_HEIGHT))
119 screen.blit(image, (0, 0))
120
121
122def draw_button(text, font, text_col, button_col, x, y, width, height):

Callers 4

main_menuFunction · 0.85
scores_screenFunction · 0.85
countdownFunction · 0.85
game_loopFunction · 0.85

Calls 1

blur_bgFunction · 0.85

Tested by

no test coverage detected