wix: updated quiz's images paths
This commit is contained in:
parent
3412cf392a
commit
b17971e6fb
1 changed files with 8 additions and 8 deletions
|
|
@ -66,22 +66,22 @@ class BaseWindow(wx.Window):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue