Mercurial > sypikslang
comparison gamelib/gui.py @ 213:2d72e84a765b
Add debugging print to fallback path
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 12 May 2012 20:34:20 +0200 |
parents | 16ce5ed563c9 |
children | 9a1a169497c6 |
comparison
equal
deleted
inserted
replaced
212:16ce5ed563c9 | 213:2d72e84a765b |
---|---|
70 def _mk_image(self, name, suffix): | 70 def _mk_image(self, name, suffix): |
71 bg = data.load_image('images/research_%s.png' % (suffix,)) | 71 bg = data.load_image('images/research_%s.png' % (suffix,)) |
72 try: | 72 try: |
73 icon = data.load_image('images/icons/%s_%s.png' % (name, suffix)) | 73 icon = data.load_image('images/icons/%s_%s.png' % (name, suffix)) |
74 except pygame.error: | 74 except pygame.error: |
75 print('Unable to load %s' % | |
76 data.filepath('images/icons/%s_%s.png' % (name, suffix))) | |
75 icon = pygame.Surface((64, 64), pygame.SRCALPHA) | 77 icon = pygame.Surface((64, 64), pygame.SRCALPHA) |
76 base = pygame.Surface((self.WIDTH, self.HEIGHT), pygame.SRCALPHA) | 78 base = pygame.Surface((self.WIDTH, self.HEIGHT), pygame.SRCALPHA) |
77 base.blit(bg, (self.WIDTH / 2 - 32, 0)) | 79 base.blit(bg, (self.WIDTH / 2 - 32, 0)) |
78 drawable = ImageDrawable((0, 0, self.WIDTH, self.HEIGHT), base) | 80 drawable = ImageDrawable((0, 0, self.WIDTH, self.HEIGHT), base) |
79 # Centre icon | 81 # Centre icon |