Draws a gradient text by layering multiple text surfaces with slight offsets.
(text, font, x, y, colors)
| 159 | |
| 160 | |
| 161 | def draw_gradient_text(text, font, x, y, colors): |
| 162 | """ |
| 163 | Draws a gradient text by layering multiple text surfaces with slight offsets. |
| 164 | """ |
| 165 | offset = 2 |
| 166 | for i, color in enumerate(colors): |
| 167 | img = font.render(text, True, color) |
| 168 | screen.blit(img, (x + i * offset, y + i * offset)) |
| 169 | |
| 170 | |
| 171 | def main_menu(): |
no outgoing calls
no test coverage detected