Mercurial > boomslang
changeset 751:d5afaadbd821 pyntnclick
Remove frame_rect, it's the same as draw_rect_image
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 26 Jan 2013 11:14:26 +0200 |
parents | ef4bda7d623d |
children | b616eeab0b82 |
files | pyntnclick/state.py |
diffstat | 1 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/pyntnclick/state.py Sun Jan 20 20:20:36 2013 +0200 +++ b/pyntnclick/state.py Sat Jan 26 11:14:26 2013 +0200 @@ -6,14 +6,7 @@ from pygame.color import Color from pyntnclick.engine import ScreenEvent - - -def frame_rect(surface, color, rect, thick=1): - # FIXME: Stolen from albow - surface.fill(color, (rect.left, rect.top, rect.width, thick)) - surface.fill(color, (rect.left, rect.bottom - thick, rect.width, thick)) - surface.fill(color, (rect.left, rect.top, thick, rect.height)) - surface.fill(color, (rect.right - thick, rect.top, thick, rect.height)) +from pyntnclick.tools.utils import draw_rect_image class Result(object): @@ -491,11 +484,11 @@ self.current_interact.rect = old_rect if self.game.debug_rects and self._interact_hilight_color: if hasattr(self.rect, 'collidepoint'): - frame_rect(surface, self._interact_hilight_color, + draw_rect_image(surface, self._interact_hilight_color, self.rect.inflate(1, 1), 1) else: for rect in self.rect: - frame_rect(surface, self._interact_hilight_color, + draw_rect_image(surface, self._interact_hilight_color, rect.inflate(1, 1), 1)