Mercurial > sypikslang
diff gamelib/gui_base.py @ 236:ce1e23ea46e5
added generic background for all windows
author | Rizmari Versfeld <rizziepit@gmail.com> |
---|---|
date | Sun, 13 May 2012 00:17:07 +0200 |
parents | 16ce5ed563c9 |
children | 05afa7ae5df3 |
line wrap: on
line diff
--- 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):