diff options
Diffstat (limited to 'data/GSOC examples/rotate polygon')
-rw-r--r-- | data/GSOC examples/rotate polygon | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/data/GSOC examples/rotate polygon b/data/GSOC examples/rotate polygon index fdf1a37..5bd2dcc 100644 --- a/data/GSOC examples/rotate polygon +++ b/data/GSOC examples/rotate polygon @@ -16,12 +16,13 @@ from pygame.locals import * from random import *
from math import cos, sin from math import pi as Pi +import gtk # always need to init first thing
pygame.init()
# XO screen is 1200x900
-size = width, height = 1200, 800
+size = width, height = gtk.gdk.screen_width(), gtk.gdk.screen_height()
# create the window and keep track of the surface
# for drawing into
@@ -152,10 +153,10 @@ while pippy.pygame.next_frame(): msg2 = "Use up and down arrows for controling size. Size : " + str(side_length) text1 = font.render(msg , True, font_colour) text_box1 = text1.get_rect() - text_box1.top = 5 + text_box1.top = height / 20 text2 = font.render(msg2 , True, font_colour) text_box2 = text2.get_rect() - text_box2.top = 20 + text_box2.top = height / 20 + 14 # 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 |