projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f2a3e9c
)
Treat tile_selected as an overlay that applies to the base tile image.
author
Simon Cross
<hodgestar@gmail.com>
Thu, 15 May 2014 16:08:08 +0000
(18:08 +0200)
committer
Simon Cross
<hodgestar@gmail.com>
Thu, 15 May 2014 16:08:08 +0000
(18:08 +0200)
naja/widgets/tile.py
patch
|
blob
|
history
diff --git
a/naja/widgets/tile.py
b/naja/widgets/tile.py
index 85f90057ecd35760aaaf858ddf6be72911ce757e..8b71d1fd016f0dca93d54aed89470209cc23ccd5 100644
(file)
--- a/
naja/widgets/tile.py
+++ b/
naja/widgets/tile.py
@@
-40,11
+40,14
@@
class TileWidget(Widget):
else:
bg = resources.get_image('board/tile_1.png',
transforms=(EIGHT_BIT,))
else:
bg = resources.get_image('board/tile_1.png',
transforms=(EIGHT_BIT,))
+ overlay = None
if self.highlighted:
if self.highlighted:
-
bg
= resources.get_image('board/tile_selected.png',
- transforms=(EIGHT_BIT,))
+
overlay
= resources.get_image('board/tile_selected.png',
+
transforms=(EIGHT_BIT,))
self.surface = pygame.surface.Surface(TILE_SIZE)
self.surface.blit(bg, (0, 0))
self.surface = pygame.surface.Surface(TILE_SIZE)
self.surface.blit(bg, (0, 0))
+ if overlay is not None:
+ self.surface.blit(overlay, (0, 0))
# Look up the required bits on the board location
card = self.state.board_locations[self.board_pos]
player_pos = self.state.player.position
# Look up the required bits on the board location
card = self.state.board_locations[self.board_pos]
player_pos = self.state.player.position