diff options
author | James Cameron <quozl@laptop.org> | 2010-05-21 09:30:18 (GMT) |
---|---|---|
committer | James Cameron <quozl@laptop.org> | 2010-05-21 09:30:18 (GMT) |
commit | 4a50004aa8f2109e6cff4a082a10581dfee0d540 (patch) | |
tree | 90daf190816ac4a24515b1df907d953a576d2809 /data/graphics/slideshow | |
parent | 0ce089fc9bb7a9f18f953a32c7195e70a62cf2b1 (diff) |
adapt pippy examples to screen dimensions, dev.laptop.org #9260
Adjust all the examples to work for different screen dimensions, and
briefly fix formatting or style in some of the other code examples.
Yet to be done:
1. slideshow, it finds no objects in journal with MIME type
image/jpeg, and as a result does not show any slides,
2. xolympics, it tests an object location against physics world
coordinates to determine winning condition.
Diffstat (limited to 'data/graphics/slideshow')
-rw-r--r-- | data/graphics/slideshow | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/data/graphics/slideshow b/data/graphics/slideshow index 0d38ab8..7ddd58b 100644 --- a/data/graphics/slideshow +++ b/data/graphics/slideshow @@ -1,4 +1,8 @@ -# slideshow: show datastore photos +# slideshow: show datastore photos + +# FIXME: does not currently work, because no objects are returned by +# the journal query. + def pippy_activity_class(): return 'activity.PyGameActivity' if __name__ == '__main__': import gst, pippy, pygame, sys, time @@ -6,12 +10,9 @@ if __name__ == '__main__': from random import * - # XO screen is 1200 by 900 - size = width, height = 1200, 900 - # grey background - bgcolor = (128,128,128) - + bgcolor = (128, 128, 128) + # Create a search dict search = {} search["mime_type"] = "image/jpeg" @@ -38,9 +39,9 @@ if __name__ == '__main__': # turn off cursor pygame.mouse.set_visible(False) - # create the pygame window at the desired size and return a Surface object for + # create the pygame window and return a Surface object for # drawing in that window. - screen = pygame.display.set_mode(size) + screen = pygame.display.set_mode() # load in previously grabbed frame image = pygame.image.load(next_image.next()) |