Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/data/graphics/bounce
diff options
context:
space:
mode:
authorC. Scott Ananian <cscott@laptop.org>2007-12-11 09:24:34 (GMT)
committer C. Scott Ananian <cscott@laptop.org>2007-12-11 09:24:34 (GMT)
commit9df72c5591aee015089a4e96f9403183262dcc01 (patch)
tree4a01e662068fe7977dbb4fd14e232fc7354863d4 /data/graphics/bounce
parent90c54afd7ea81be376b078eb08b87e4f20e71dcf (diff)
Factor out a pippy library, which programs can use with 'import pippy'.
The pygame portion of the library uses 'best practices' to avoid eating up CPU, and pauses & suspends after 20 seconds of inactivity.
Diffstat (limited to 'data/graphics/bounce')
-rw-r--r--data/graphics/bounce4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/graphics/bounce b/data/graphics/bounce
index 02bc34f..d0bcd3c 100644
--- a/data/graphics/bounce
+++ b/data/graphics/bounce
@@ -1,6 +1,6 @@
# bounce: move some text around the screen
-import sys,pygame
+import pippy, pygame, sys
from pygame.locals import *
from random import *
@@ -44,7 +44,7 @@ textRect = text.get_rect()
textRect.left = 0;
textRect.top = 0;
-while 1:
+while pippy.pygame.next_frame():
for event in pygame.event.get():
if event.type == QUIT: