From 88cc999c9b273c2017d96c7c9aa043495b93b2e7 Mon Sep 17 00:00:00 2001 From: Dinko Galetic Date: Thu, 10 Jun 2010 10:31:23 +0000 Subject: "Koch snowflake", "Sierpinski - graphics" and "rotate polygon" now quit on q, not just any key except arrows. --- diff --git a/data/GSOC examples/Koch snowflake b/data/GSOC examples/Koch snowflake index 00159bd..c60d300 100644 --- a/data/GSOC examples/Koch snowflake +++ b/data/GSOC examples/Koch snowflake @@ -190,7 +190,7 @@ while pippy.pygame.next_frame(): elif event.type == KEYDOWN and event.key == K_LEFT and depth > 0: depth = depth-1 lines = produce_lines(starting_lines, depth) - elif event.type == KEYDOWN: + elif event.type == KEYDOWN and event.key == K_q: sys.exit() screen.fill(bgcolor) # Display the current step. diff --git a/data/GSOC examples/Sierpinski - graphics b/data/GSOC examples/Sierpinski - graphics index f61111a..f5d75cc 100644 --- a/data/GSOC examples/Sierpinski - graphics +++ b/data/GSOC examples/Sierpinski - graphics @@ -101,7 +101,7 @@ while pippy.pygame.next_frame(): elif event.type == KEYDOWN and event.key == K_LEFT and depth > 0: depth -= 1 recalculate = True - elif event.type == KEYDOWN: + elif event.type == KEYDOWN and event.key == K_q: sys.exit() screen.fill(white) # Display the current step. diff --git a/data/GSOC examples/rotate polygon b/data/GSOC examples/rotate polygon index 5bd2dcc..6061bfd 100644 --- a/data/GSOC examples/rotate polygon +++ b/data/GSOC examples/rotate polygon @@ -142,7 +142,7 @@ while pippy.pygame.next_frame(): elif event.type == KEYDOWN and event.key == K_DOWN and side_length > 5: side_length -= 5 size_changed = True - elif event.type == KEYDOWN: + elif event.type == KEYDOWN and event.key == K_q: sys.exit() screen.fill(bgcolor) -- cgit v0.9.1