Clone
1
Centreing a surface
Brosef edited this page 2025-06-21 22:24:00 +00:00

Centreing a surface

gameUtils.centre(surface, size) provides an easy way to centre a surface.

Usage:

self.surf.blit(gameUtils.centre(image, self.size), (0, 0))

This will centre image to the middle of the game window.