From: Simon Cross Date: Sat, 17 May 2014 13:47:03 +0000 (+0200) Subject: Use new puzzle tiles. X-Git-Tag: 0.1~96^2~7 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=7455fe3bc40e0911a6c86cf5caf129cf63a99a3f;p=naja.git Use new puzzle tiles. --- diff --git a/naja/widgets/tile.py b/naja/widgets/tile.py index c932667..5417dcf 100644 --- a/naja/widgets/tile.py +++ b/naja/widgets/tile.py @@ -34,10 +34,19 @@ class TileWidget(Widget): # Draw background x, y = abs(self.board_pos[0] - 2), abs(self.board_pos[1] - 2) + if self.state.gameboard.puzzle: + tile_1_name = 'board/tile_1.png' + tile_2_name = 'board/tile_2_puzzle.png' + tile_available_name = 'board/tile_available_puzzle.png' + else: + tile_1_name = 'board/tile_1.png' + tile_2_name = 'board/tile_2.png' + tile_available_name = 'board/tile_available.png' + if (x + y) % 2 == 0: - bg_name = 'board/tile_2.png' + bg_name = tile_2_name else: - bg_name = 'board/tile_1.png' + bg_name = tile_1_name bg = resources.get_image(bg_name, transforms=(EIGHT_BIT,)) overlays = [] @@ -45,7 +54,7 @@ class TileWidget(Widget): if self.state.gameboard.player_mode == EXAMINE and legal_move: overlays.append(resources.get_image( - 'board/tile_available.png', transforms=(EIGHT_BIT,))) + tile_available_name, transforms=(EIGHT_BIT,))) if self.highlighted: overlays.append(resources.get_image( 'board/tile_selected.png',