changeset 322:f8e9a8851d7d

Tweak size of game over overlay.
author Simon Cross <hodgestar@gmail.com>
date Sat, 05 Sep 2009 19:31:59 +0000
parents 306b20f3546c
children 978efd39a099
files gamelib/imagecache.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/imagecache.py	Sat Sep 05 19:30:22 2009 +0000
+++ b/gamelib/imagecache.py	Sat Sep 05 19:31:59 2009 +0000
@@ -75,8 +75,10 @@
 def darken_center(image):
     darkened = image.copy()
     w, h = darkened.get_size()
-    over_w, over_h = int(w*0.5), int(h*0.5)
-    over_x, over_y = int(w*0.25), int(h*0.25)
+    fraction = 0.65
+    offset = (1.0 - fraction) / 2.0
+    over_w, over_h = int(w*fraction), int(h*fraction)
+    over_x, over_y = int(w*offset), int(h*offset)
     overlay = pygame.Surface((over_w, over_h))
     overlay.fill(DARKEN_COLOUR)
     darkened.blit(overlay, (over_x, over_y), None, BLEND_MULT)