Mercurial > nagslang
comparison tools/area_editor.py @ 206:42c565c5ce76
PEP8
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Tue, 03 Sep 2013 23:32:46 +0200 |
parents | 51f979ddddbb |
children | 06c52529e2ed |
comparison
equal
deleted
inserted
replaced
205:51f979ddddbb | 206:42c565c5ce76 |
---|---|
158 pointlist = [self.point_to_pygame(p) for p in line] | 158 pointlist = [self.point_to_pygame(p) for p in line] |
159 pygame.draw.lines(self._surface, LINE_COLOR, False, pointlist, 2) | 159 pygame.draw.lines(self._surface, LINE_COLOR, False, pointlist, 2) |
160 if draw_cand_line and start_pos and mouse_pos: | 160 if draw_cand_line and start_pos and mouse_pos: |
161 endpoint = self.fix_line_angle(start_pos, mouse_pos) | 161 endpoint = self.fix_line_angle(start_pos, mouse_pos) |
162 pointlist = [self.round_point(start_pos), | 162 pointlist = [self.round_point(start_pos), |
163 self.point_to_pygame(endpoint)] | 163 self.point_to_pygame(endpoint)] |
164 pygame.draw.lines(self._surface, LINE_COLOR, False, pointlist, 1) | 164 pygame.draw.lines(self._surface, LINE_COLOR, False, pointlist, 1) |
165 return self._surface.copy() | 165 return self._surface.copy() |
166 | 166 |
167 | 167 |
168 class LevelWidget(Widget): | 168 class LevelWidget(Widget): |
218 # Interior wall mode | 218 # Interior wall mode |
219 mouse_pos = self._level_coordinates(self.mouse_pos) | 219 mouse_pos = self._level_coordinates(self.mouse_pos) |
220 else: | 220 else: |
221 mouse_pos = None | 221 mouse_pos = None |
222 level_surface = level.draw(mouse_pos, self.cur_poly, self.filled_mode, | 222 level_surface = level.draw(mouse_pos, self.cur_poly, self.filled_mode, |
223 self._draw_lines, self._start_pos) | 223 self._draw_lines, self._start_pos) |
224 if self._draw_objects: | 224 if self._draw_objects: |
225 for thing in self.level.drawables: | 225 for thing in self.level.drawables: |
226 if not isinstance(thing, Enemy): | 226 if not isinstance(thing, Enemy): |
227 thing.render(level_surface) | 227 thing.render(level_surface) |
228 if self._draw_enemies: | 228 if self._draw_enemies: |