Mercurial > boomslang
changeset 760:f288e5ec0a75 pyntnclick
Convert FIXME about animation image size equivalence into an assertion
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 26 Jan 2013 13:02:19 +0200 |
parents | 386475464202 |
children | ac9ffba3e97d |
files | pyntnclick/scenewidgets.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pyntnclick/scenewidgets.py Sat Jan 26 13:00:31 2013 +0200 +++ b/pyntnclick/scenewidgets.py Sat Jan 26 13:02:19 2013 +0200 @@ -96,7 +96,6 @@ class InteractAnimated(Interact): """Interactive with an animation rather than an image""" - # FIXME: Assumes all images are the same size # anim_seq - sequence of image names # delay - number of frames to wait between changing images @@ -112,6 +111,8 @@ self._anim_seq = [get_image(thing.folder, x) for x in self._names] self.image = self._anim_seq[0] self.rect = Rect(self._pos, self.image.get_size()) + for image in self._anim_seq: + assert image.get_size() == self.rect.size self.interact_rect = self.rect def animate(self):