Changeset 452:9ae08939fd90


Ignore:
Timestamp:
Sep 7, 2013, 1:17:26 PM (7 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
rebase_source:
2a5aafbc3e1e7c5174695d92987d88fbd1971fa3
Message:

Hack to fix call to snap_to_grid from EditLevel?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/area_editor.py

    r450 r452  
    127127
    128128    def draw(self, mouse_pos, mouse_poly, filled, draw_cand_line, start_pos,
    129              move_point_mode, move_point, zoom_factor):
     129             move_point_mode, move_point, zoom_factor, level_widget):
    130130        self._draw_background(True)
    131131        # Draw polygons as needed for the editor
     
    163163                              line_width)
    164164        if draw_cand_line and start_pos and mouse_pos:
    165             endpoint = self.snap_to_grid(mouse_pos)
     165            endpoint = level_widget.snap_to_grid(mouse_pos)
    166166            pointlist = [start_pos,
    167167                         self.point_to_pygame(endpoint)]
     
    495495                                   self._draw_lines, self._start_pos,
    496496                                   self._move_point_mode, self._move_point,
    497                                    self._zoom_factor)
     497                                   self._zoom_factor, self)
    498498        if self._draw_objects:
    499499            for thing in self.level.drawables:
Note: See TracChangeset for help on using the changeset viewer.