0
People you have knowledge of how to align the screen of my game in the center of the desktop screen?
0
People you have knowledge of how to align the screen of my game in the center of the desktop screen?
3
SDL, engine that the Pygame is based, uses the environment variable SDL_VIDEO_CENTERED to indicate that the window must be centered. The variable must be declared before the Pygame be initiated by the function init().
import pygame
import os
os.environ['SDL_VIDEO_CENTERED'] = '1'
pygame.init()
Browser other questions tagged python
You are not signed in. Login or sign up in order to post.
Do you have the code that generates your window? It is easier to receive answers.
– noNihongo
You have to put more information in your question. How to know what to line up without seeing the code? Placing images also helps.
– uaiHebert