diff frontends/src/wix/quiz_game.py @ 368:d9499d27f884

wix: updated quiz's images paths
author Goffi <goffi@goffi.org>
date Sat, 18 Jun 2011 23:28:10 +0200
parents 208107419b17
children cf005701624b
line wrap: on
line diff
--- a/frontends/src/wix/quiz_game.py	Sat Jun 18 23:04:36 2011 +0200
+++ b/frontends/src/wix/quiz_game.py	Sat Jun 18 23:28:10 2011 +0200
@@ -66,22 +66,22 @@
         self.SetMinSize(wx.Size(WIDTH, HEIGHT))
         self.Bind(wx.EVT_PAINT, self.onPaint)
         self.graphic_elts = {}
-        self.loadImages("images/quiz/")
+        self.loadImages(os.path.join(parent.parent.host.media_dir, 'games/quiz/'))
 
     def loadImages(self, dir):
         """Load all the images needed for the game
         @param dir: directory where the PNG files are"""
         x_player = 24
-        for name, sub_dir, filename, x, y, zindex, transparent in [("background", "backgrounds", "blue_background.png", 0, 0, 0, False),
-                                                             ("joueur0", "characters/zombie", "zombie.png", x_player+0*184, 170, 5, True),
-                                                             ("joueur1", "characters/nerd", "nerd2.png", x_player+1*184, 170, 5, True),
-                                                             ("joueur2", "characters/zombie", "zombie.png", x_player+2*184, 170, 5, True),
-                                                             ("joueur3", "characters/zombie", "zombie.png", x_player+3*184, 170, 5, True),
+        for name, sub_dir, filename, x, y, zindex, transparent in [("background", "background", "blue_background.png", 0, 0, 0, False),
+                                                             ("joueur0", "characters", "zombie.png", x_player+0*184, 170, 5, True),
+                                                             ("joueur1", "characters", "nerd.png", x_player+1*184, 170, 5, True),
+                                                             ("joueur2", "characters", "zombie.png", x_player+2*184, 170, 5, True),
+                                                             ("joueur3", "characters", "zombie.png", x_player+3*184, 170, 5, True),
                                                              ("foreground", "foreground", "foreground.png", 0, 0, 10, True)]:
             self.graphic_elts[name] = GraphicElement(os.path.join(dir, sub_dir, filename), x = x, y = y, zindex=zindex, transparent=transparent)
 
-        self.right_image = wx.Image(os.path.join(dir, "right.png")).ConvertToBitmap()
-        self.wrong_image = wx.Image(os.path.join(dir, "wrong.png")).ConvertToBitmap()
+        self.right_image = wx.Image(os.path.join(dir, "foreground", "right.png")).ConvertToBitmap()
+        self.wrong_image = wx.Image(os.path.join(dir, "foreground", "wrong.png")).ConvertToBitmap()
 
     def fullPaint(self, device_context):
         """Paint all the game on the given dc