vineri, 9 august 2013

PyGame - first interface - part 3

Today I will show you just few tips about pygame window.
If we want to put the window in the centre of the screen we can use this:
import os
os.environ['SDL_VIDEO_CENTERED'] = '1'
Most of the pygame windows is made by :
def main():
  background_colour = (25,25,255)
  screen = pygame.display.set_mode((320,240))
This will create this window:

Now if you don't need a title window , like the next image...

... then you need to use this source code :
  screen = pygame.display.set_mode((320,240),NOFRAME)