| | |
pygame full screen help
Thread Solved |
I used to play around with SDL in my C++ days. PyGame is based on SDL. I know in C++ you can use something like ...
[php]SDL_Surface *screen;
screen = SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE | SDL_RESIZABLE);
[/php]This should have carried over to PyGame. You might use something like this ...
[php]
import pygame
pygame.init()
# change to whatever your full screen size might be
size = width, height = 800, 600
screen = pygame.display.set_mode(size)
[/php]
[php]SDL_Surface *screen;
screen = SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE | SDL_RESIZABLE);
[/php]This should have carried over to PyGame. You might use something like this ...
[php]
import pygame
pygame.init()
# change to whatever your full screen size might be
size = width, height = 800, 600
screen = pygame.display.set_mode(size)
[/php]
May 'the Google' be with you!
•
•
Join Date: Jul 2005
Posts: 8
Reputation:
Solved Threads: 1
in pygame it's:
import pygame
from pygame.locals import * #need this for 'FULLSCREEN' value
pygame.init()
WIDTH=800
HEIGHT=600
pygame.display.set_mode((WIDTH,HEIGHT),FULLSCREEN)
also - make sure you include code to quit the app or you won't get out. (ev.type==QUIT doesnt work in fullscreen, and locked up my mac, win or linux may be different)
import pygame
from pygame.locals import * #need this for 'FULLSCREEN' value
pygame.init()
WIDTH=800
HEIGHT=600
pygame.display.set_mode((WIDTH,HEIGHT),FULLSCREEN)
also - make sure you include code to quit the app or you won't get out. (ev.type==QUIT doesnt work in fullscreen, and locked up my mac, win or linux may be different)
![]() |
Similar Threads
- full screen applet in java (Java)
- Full screen prob (Shell Scripting)
- Why can't I view "full screen" in Preview? (Mac Software)
- Unable to open games in full screen (Windows NT / 2000 / XP)
- Full Screen (Java)
Other Threads in the Python Forum
- Previous Thread: Books,Books,Books
- Next Thread: mandelbrot generator messed up
| Thread Tools | Search this Thread |
accessdenied advanced apache application argv array beginner book builtin calculator change command converter countpasswordentry csv curved dan08 def dictionary dynamic edit enter event file float format function google homework import inches input jaunty java keyboard lapse library line lines linux list lists loop microphone mouse movingimageswithpygame mysqlquery newb number numbers numeric obexftp output parameters parsing path phonebook plugin prime programming py2exe pygame pyopengl python random recursion redirect remote return reverse scrolledtext session simple skinning software sprite statictext string strings syntax table terminal text textarea threading time tlapse trick tuple tutorial twoup ubuntu unicode unit urllib urllib2 variable voip wordgame wxpython






