diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-03-10 23:11:49 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-03-10 23:11:49 (GMT) |
commit | e0a6fc7e1435f34db7a92088bb16c1a3189bfd88 (patch) | |
tree | aaf6305040aa12ffa813eaa1b5539ea78d55a3a6 | |
parent | 9faf267e89d39027a10df88d8e673eaacefa230a (diff) |
Change the mode property in MapNavView to view_mode
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | editmap.py | 2 | ||||
-rw-r--r-- | mapnav.py | 8 |
2 files changed, 5 insertions, 5 deletions
@@ -27,7 +27,7 @@ class EditMapWin(gtk.HBox): left_vbox = gtk.VBox() self.nav_view = MapNavView(self.game_map) - self.nav_view.mode = MapNavView.MODE_EDIT + self.nav_view.view_mode = MapNavView.MODE_EDIT self.top_view = TopMapView(self.game_map, 150, 150) self.top_view.show_position(self.nav_view.x, self.nav_view.y, self.nav_view.direction) @@ -45,7 +45,7 @@ class MapNavView(gtk.DrawingArea): self.y = 0 self.direction = 'S' self.cache_info = {} - self.mode = self.MODE_PLAY + self.view_mode = self.MODE_PLAY self.selected = None super(MapNavView, self).__init__() self.set_can_focus(True) @@ -100,7 +100,7 @@ class MapNavView(gtk.DrawingArea): return True def __button_press_event_cb(self, widget, event): - if self.mode == self.MODE_EDIT: + if self.view_mode == self.MODE_EDIT: info_walls = self.get_information_walls(self.x, self.y, self.direction) for wall_object in info_walls['objects']: @@ -128,7 +128,7 @@ class MapNavView(gtk.DrawingArea): self.update_wall_info(self.x, self.y, self.direction) def __motion_notify_event_cb(self, widget, event): - if self.mode == self.MODE_EDIT: + if self.view_mode == self.MODE_EDIT: if self.selected is not None: # move the object # TODO: control limits @@ -320,7 +320,7 @@ class MapNavView(gtk.DrawingArea): wall_object['height'] = height ctx.restore() - if self.mode == self.MODE_EDIT and \ + if self.view_mode == self.MODE_EDIT and \ self.selected is not None and \ self.selected.data['original'] == wall_object['original']: # draw controls |