From 1bf27049195dcf5a6816704d8c195f9a99e792fc Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Thu, 03 Mar 2011 13:26:47 +0000 Subject: Run graphics (pygame) examples in full screen mode (OLPC#10688) Sugar < 0.86 used a special window manager that put every window in full screen mode automatically. To achieve the same with "regular" window managers like we use in Sugar 0.86+, we need to tell pygame that we want full screen mode. Signed-off-by: Sascha Silbe Reviewed-By: Simon Schampijer Acked-by: James Cameron --- diff --git a/data/graphics/bounce b/data/graphics/bounce index 375d530..74b87dd 100644 --- a/data/graphics/bounce +++ b/data/graphics/bounce @@ -22,7 +22,7 @@ pygame.mouse.set_visible(False) # create the window and keep track of the surface # for drawing into -screen = pygame.display.set_mode() +screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) # ask for screen's width and height size = width, height = screen.get_size() diff --git a/data/graphics/camera b/data/graphics/camera index f0eb35f..2a37675 100644 --- a/data/graphics/camera +++ b/data/graphics/camera @@ -21,7 +21,7 @@ pygame.mouse.set_visible(False) # create the pygame window and return a Surface object for # drawing in that window. -screen = pygame.display.set_mode() +screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) # pause for a second to allow the camera frame to be grabbed time.sleep(1) diff --git a/data/graphics/lines b/data/graphics/lines index 5699719..bd559a6 100644 --- a/data/graphics/lines +++ b/data/graphics/lines @@ -14,7 +14,7 @@ pygame.mouse.set_visible(False) # create the window and keep track of the surface # for drawing into -screen = pygame.display.set_mode() +screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) # ask for screen's width and height size = width, height = screen.get_size() diff --git a/data/graphics/physics b/data/graphics/physics index 3d57a06..08aa696 100644 --- a/data/graphics/physics +++ b/data/graphics/physics @@ -9,7 +9,7 @@ from pippy import physics # initialize pygame first thing pygame.init() -screen = pygame.display.set_mode() +screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) # set up the physics world (instance of Elements) world = physics.Elements(screen.get_size()) diff --git a/data/graphics/pong b/data/graphics/pong index 8182861..9134f53 100644 --- a/data/graphics/pong +++ b/data/graphics/pong @@ -16,7 +16,7 @@ pygame.init() # create the window and keep track of the surface # for drawing into -screen = pygame.display.set_mode() +screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) # ask for screen's width and height size = width, height = screen.get_size() diff --git a/data/graphics/snow b/data/graphics/snow index af8abf9..e1b2df1 100644 --- a/data/graphics/snow +++ b/data/graphics/snow @@ -11,7 +11,7 @@ pygame.init() # create the window and keep track of the surface # for drawing into -screen = pygame.display.set_mode() +screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) # ask for screen's width and height width, height = screen.get_size() diff --git a/data/graphics/tree b/data/graphics/tree index 04996f7..5a56620 100644 --- a/data/graphics/tree +++ b/data/graphics/tree @@ -12,7 +12,7 @@ pygame.init() # create the window and keep track of the surface # for drawing into -screen = pygame.display.set_mode() +screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) # ask for screen's width and height width, height = screen.get_size() diff --git a/data/graphics/xolympics b/data/graphics/xolympics index b6ed90b..51be828 100644 --- a/data/graphics/xolympics +++ b/data/graphics/xolympics @@ -30,7 +30,7 @@ class XOlympicsGame: self.rightJump = False self.updateList = [] - self.screen = pygame.display.set_mode() + self.screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) self.width, self.height = self.screen.get_size() self.clock = pygame.time.Clock() -- cgit v0.9.1