Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <silbe@activitycentral.com>2011-03-03 13:26:47 (GMT)
committer James Cameron <quozl@laptop.org>2011-03-03 22:24:26 (GMT)
commit1bf27049195dcf5a6816704d8c195f9a99e792fc (patch)
tree6b9852ece635816498c82c62c4369e77f2728b2b
parent7a851677a70b56cd662b1fb25a4cc40f79d08da4 (diff)
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 <silbe@activitycentral.com> Reviewed-By: Simon Schampijer <simon@laptop.org> Acked-by: James Cameron <quozl@laptop.org>
-rw-r--r--data/graphics/bounce2
-rw-r--r--data/graphics/camera2
-rw-r--r--data/graphics/lines2
-rw-r--r--data/graphics/physics2
-rw-r--r--data/graphics/pong2
-rw-r--r--data/graphics/snow2
-rw-r--r--data/graphics/tree2
-rw-r--r--data/graphics/xolympics2
8 files changed, 8 insertions, 8 deletions
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()