# HG changeset patch # User Stefano Rivera # Date 1359191666 -7200 # Node ID d5afaadbd821f8b6ee799f2759a412ba62b85fd0 # Parent ef4bda7d623d974b1929f2be492b196eed3f4b66 Remove frame_rect, it's the same as draw_rect_image diff -r ef4bda7d623d -r d5afaadbd821 pyntnclick/state.py --- 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)