Mercurial > pyntnclick
diff gamelib/gamescreen.py @ 526:a984cf27b527
Defer some resource loading until it's actually necessary.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Wed, 08 Sep 2010 17:33:07 +0200 |
parents | 92782d1ca7be |
children | 0ce08d5e2acb |
line wrap: on
line diff
--- a/gamelib/gamescreen.py Wed Sep 08 14:02:11 2010 +0200 +++ b/gamelib/gamescreen.py Wed Sep 08 17:33:07 2010 +0200 @@ -116,8 +116,8 @@ def show_detail(self, detail): self.clear_detail() - w, h = self.state.set_current_detail(detail) - self.detail.set_image_rect(Rect(0, 0, w, h)) + detail_obj = self.state.set_current_detail(detail) + self.detail.set_image_rect(Rect((0, 0), detail_obj.get_detail_size())) self.add_centered(self.detail) self.state.do_enter_detail()