Hmm. pygame.display.quit()... wouldn't stopping the display cause a problem if the game is running? After all, my game is using PGU. Joe
On 10/25/06, René Dudfield <[EMAIL PROTECTED]> wrote:
From our friendly, food covered handwritten cookbook that I keep on top of my fridge... http://www.pygame.org/wiki/toggle_fullscreen?parent=CookBook On 10/26/06, Joseph Quigley <[EMAIL PROTECTED]> wrote: > How can I switch between windowed and fullscreen mode? I don't want to > use pygame.display.toggle_fullscreen (because it doesn't seem to work > with my code) and pygame.display.set_mode(resolution, > pygame.FULLSCREEN) doesn't make a windowed version of my game when I > restart it. > > Here's the some of the code I'm currently trying to get to work: > if e.key == K_F10: > isFullScreen = self.settings['fullScreen'] > isFullScreen = int(not isFullScreen) > > # try to change the mode > base.setScreenMode((0,pygame.FULLSCREEN)[isFullScreen],int(self.settings['bpp'])) > # save changes > self.settings['fullScreen'] = isFullScreen > base.saveGameSettings(self.settings) > return 1 > > self.settings["fullscreen"] can be either 1 for True or 0 for False. > Thanks, > Joe > -- > All Your Base Are Belong To Us!!! chown -r us ./base > > "After three days without programming, life becomes meaningless.'' -- > Tao of Programming Book 2 >
-- All Your Base Are Belong To Us!!! chown -r us ./base "After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2
