0

I have a basic pygame window with nothing drawn to it. This is the code:

import pygame
import os

os.environ["SDL_VIDEO_CENTERED"] = "1"

win = pygame.display
D = win.set_mode((1200, 600))

while True:
    win.fill((0, 0, 0))

This code when run in python IDLE, centeres the window, but when run in sublime text, dosent center the window. Is there anything i can do to center it when i run it with sublime text? Thanks

  • What does the build system look like that you're using to execute code from within Sublime? – OdatNurd Jan 24 '20 at 22:32
  • I selected python –  Jan 24 '20 at 22:41
  • for work in sublime you can set directly in system `SDL_VIDEO_CENTERED = 1` and after you create all code then test code directly in system without `SDL_VIDEO_CENTERED = 1` in system – furas Jan 25 '20 at 03:17

0 Answers0