From 7455fe3bc40e0911a6c86cf5caf129cf63a99a3f Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 17 May 2014 15:47:03 +0200 Subject: [PATCH] Use new puzzle tiles. --- naja/widgets/tile.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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', -- 2.34.1