comparison pyntnclick/scenewidgets.py @ 818:8b4a0aad8aeb pyntnclick

Remove unneeded rect union code
author Neil Muller <neil@dip.sun.ac.za>
date Mon, 28 Jan 2013 15:46:22 +0200
parents a8510f4e2ea1
children 80ff3c9187bc
comparison
equal deleted inserted replaced
817:beac13c4e982 818:8b4a0aad8aeb
53 53
54 54
55 class InteractRectUnion(Interact): 55 class InteractRectUnion(Interact):
56 56
57 def __init__(self, rect_list): 57 def __init__(self, rect_list):
58 # pygame.rect.Rect.unionall should do this, but is broken 58 super(InteractRectUnion, self).__init__(None, None, None)
59 # in some pygame versions (including 1.8, it appears)
60 rect_list = [Rect(x) for x in rect_list] 59 rect_list = [Rect(x) for x in rect_list]
61 union_rect = rect_list[0]
62 for rect in rect_list[1:]:
63 union_rect = union_rect.union(rect)
64 super(InteractRectUnion, self).__init__(None, None, union_rect)
65 self.interact_rect = rect_list 60 self.interact_rect = rect_list
66 61
67 62
68 class InteractImage(Interact): 63 class InteractImage(Interact):
69 64