Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mapnav.py
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2012-02-06 11:21:58 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-02-06 11:21:58 (GMT)
commitab44a6340c2172f4b305bb801174bf97111f771b (patch)
tree9fbfc40eb49968750148bb6ab64c7baecdfb98d2 /mapnav.py
parent952583926af90301cfee57c19cf72f4de9954598 (diff)
Add wall colors
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Diffstat (limited to 'mapnav.py')
-rw-r--r--mapnav.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mapnav.py b/mapnav.py
index 7324230..be34dba 100644
--- a/mapnav.py
+++ b/mapnav.py
@@ -110,8 +110,10 @@ class MapNavView(gtk.DrawingArea):
ccw_direction = self._game_map.get_direction_ccw(direction)
wall_ccw = self._game_map.get_wall_info(x, y, ccw_direction) is \
not None
+ # Wall color?
+ wall_color = self._game_map.get_wall_color(x, y)
info = {'have_door': have_door, 'wall_cw': wall_cw,
- 'wall_ccw': wall_ccw}
+ 'wall_ccw': wall_ccw, 'wall_color': wall_color}
self.cache_info[key] = info
return info
@@ -120,7 +122,7 @@ class MapNavView(gtk.DrawingArea):
info_walls = self.get_information_walls(x, y, self.direction)
# draw back wall
ctx.rectangle(0, 0, self._width, self._height - self._grid_size)
- fill = (1, 1, 1)
+ fill = info_walls['wall_color']
stroke = (0, 0, 0)
ctx.set_source_rgb(*fill)
ctx.fill_preserve()