From 0c636d0433aa7f26640f4e9923343ffe4dba1256 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Sat, 08 Dec 2007 22:36:34 +0000 Subject: Allow any key to quit pygame apps. --- (limited to 'data') diff --git a/data/graphics/bounce b/data/graphics/bounce index 94e5c8b..02bc34f 100644 --- a/data/graphics/bounce +++ b/data/graphics/bounce @@ -1,8 +1,4 @@ # bounce: move some text around the screen -# use the escape key to exit -# -# on the XO, the escape key is the top lefthand key, -# circle with an x in it. import sys,pygame from pygame.locals import * @@ -55,8 +51,7 @@ while 1: sys.exit() elif event.type == KEYDOWN: - if event.key == K_ESCAPE: - sys.exit() + sys.exit() screen.fill((250,250,250)) diff --git a/data/graphics/image b/data/graphics/image index 8ee1796..8a1bbb8 100644 --- a/data/graphics/image +++ b/data/graphics/image @@ -1,6 +1,4 @@ # image: take a picture -# -# any keypress to exit import sys, pygame, gst, time from random import * diff --git a/data/graphics/lines b/data/graphics/lines index 1885d61..682ab37 100644 --- a/data/graphics/lines +++ b/data/graphics/lines @@ -1,8 +1,4 @@ -# lines: make lots of lines on the screen, just for fun! -# use the escape key to exit -# -# on the XO, the escape key is the top lefthand key, -# circle with an x in it. +# lines: make lots of lines on the screen import sys,pygame from pygame.locals import * @@ -43,8 +39,7 @@ while 1: sys.exit() elif event.type == KEYDOWN: - if event.key == K_ESCAPE: - sys.exit() + sys.exit() # draw the line using the current values and width=3 pygame.draw.line(screen, color, start, end, 3) -- cgit v0.9.1