changeset 236:ce1e23ea46e5

added generic background for all windows
author Rizmari Versfeld <rizziepit@gmail.com>
date Sun, 13 May 2012 00:17:07 +0200
parents 212bfbb96055
children d7285d65c668
files data/images/background.jpg gamelib/gui_base.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
Binary file data/images/background.jpg has changed
--- a/gamelib/gui_base.py	Sun May 13 00:11:54 2012 +0200
+++ b/gamelib/gui_base.py	Sun May 13 00:17:07 2012 +0200
@@ -2,8 +2,10 @@
 from pygame.locals import SRCALPHA
 from pygame import Surface, Rect
 from pygame.font import Font
+from pygame import image
 
 from gamelib import data
+from gamelib.data import filepath
 
 
 # different font sizes
@@ -77,7 +79,8 @@
         super(Window, self).__init__()
         self.surface = Surface((screen.get_width(), screen.get_height()))
         self.background_colour = None
-        self.background_image = None
+        self.background_image = image.load(
+                filepath('images/background.jpg'))
         self.pressed_child = None
 
     def on_mouse_down(self, pos):