From 3eb7e3326672960866b157ccf648766c0ff1aa06 Mon Sep 17 00:00:00 2001 From: Dinko Galetic Date: Fri, 11 Jun 2010 20:25:41 +0000 Subject: Added "press q to quit" messages to graphical examples (Koch, Sierpinski, rotate polygin). --- (limited to 'data') diff --git a/data/GSOC examples/Koch snowflake b/data/GSOC examples/Koch snowflake index c60d300..8d93b22 100644 --- a/data/GSOC examples/Koch snowflake +++ b/data/GSOC examples/Koch snowflake @@ -162,7 +162,7 @@ starting_lines.append(BA) depth = 0 # For displaying the instructions. -use = "Use left and right arrows" +use = "Use left and right arrows; q to quit." font_size = 36 # Remember, colors are in RGB (Red, Green, Blue) system. font_colour = (10, 250, 20) diff --git a/data/GSOC examples/Sierpinski - graphics b/data/GSOC examples/Sierpinski - graphics index f5d75cc..6c321b4 100644 --- a/data/GSOC examples/Sierpinski - graphics +++ b/data/GSOC examples/Sierpinski - graphics @@ -111,7 +111,7 @@ while pippy.pygame.next_frame(): text_box.top = height / 10 text_box.left = width / 20 # Display the instructions - text2 = font.render("Use left and right arrows.", True, black) + text2 = font.render("Use left and right arrows; q to quit", True, black) text_box2 = text2.get_rect() text_box2.top = height / 10 - 30 text_box2.left = width / 20 diff --git a/data/GSOC examples/rotate polygon b/data/GSOC examples/rotate polygon index 01d2b9d..aa6c838 100644 --- a/data/GSOC examples/rotate polygon +++ b/data/GSOC examples/rotate polygon @@ -151,12 +151,16 @@ while pippy.pygame.next_frame(): msg = "Use left and right arrows for controling speed. Speed: " msg = msg + str(speed_factor) msg2 = "Use up and down arrows for controling size. Size : " + str(side_length) + msg3 = "Press q to quit." text1 = font.render(msg , True, font_colour) text_box1 = text1.get_rect() text_box1.top = height / 20 text2 = font.render(msg2 , True, font_colour) text_box2 = text2.get_rect() text_box2.top = height / 20 + 14 + text3 = font.render(msg3 , True, font_colour) + text_box3 = text3.get_rect() + text_box3.top = height / 20 + 28 # if the L or R arrow is pressed (and held), keep adjusting speed # You'll have to click it real fast if you with to change the speed by @@ -189,6 +193,7 @@ while pippy.pygame.next_frame(): # draw the text screen.blit(text1, text_box1) screen.blit(text2, text_box2) + screen.blit(text3, text_box3) # refresh the screen pygame.display.flip() -- cgit v0.9.1