Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mapnav.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-05-04 03:58:25 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-05-04 03:58:25 (GMT)
commitb69adce545f8c51eec7211b040b7d6ac0157d5bc (patch)
tree41f20083f452f22c4e81a945e92b57cfdf15ef39 /mapnav.py
parentfb6dc6f40883f5c348d9800eea1a8efe83b63d1b (diff)
Fix: Better startup position for character
Diffstat (limited to 'mapnav.py')
-rw-r--r--mapnav.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mapnav.py b/mapnav.py
index 77d1682..1f089d0 100644
--- a/mapnav.py
+++ b/mapnav.py
@@ -76,7 +76,7 @@ class MapNavView(gtk.DrawingArea):
self.calculate_sizes(allocation.width, allocation.height)
if self.view_mode == self.MODE_PLAY:
character_y = allocation.height - self._grid_size
- self._character.pos = [0, character_y]
+ self._character.pos = [style.GRID_CELL_SIZE , character_y]
self._character.direction = 1
self._character.change_animation('stand', flip_x=1)
self.disconnect(self._setup_handle)
@@ -236,7 +236,10 @@ class MapNavView(gtk.DrawingArea):
if self._character.pos[0] >= self._width - self._grid_size:
self._character.pos[0] = self._grid_size
elif self._character.pos[0] < self._grid_size:
- self._character.pos[0] = self._width - self._grid_size
+ # TODO: we should expose this value
+ char_width = self._character.sprite.cel_width
+ self._character.pos[0] = \
+ self._width - self._grid_size - char_width
self.queue_draw()
return not finish