Mercurial > sypikslang
comparison gamelib/gui_base.py @ 266:381fa22d217b
Fix width / height confusion buglet
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sun, 15 Dec 2013 11:43:17 +0200 |
parents | 330a63dc176e |
children |
comparison
equal
deleted
inserted
replaced
265:d2d1d9ccb22d | 266:381fa22d217b |
---|---|
182 self.font.set_bold(True) | 182 self.font.set_bold(True) |
183 self.text_surface = self.font.render(self.text, True, self.color) | 183 self.text_surface = self.font.render(self.text, True, self.color) |
184 size = self.font.size(self.text) | 184 size = self.font.size(self.text) |
185 if self.shadow: | 185 if self.shadow: |
186 s = self.font.render(self.text, True, self.shadow_color) | 186 s = self.font.render(self.text, True, self.shadow_color) |
187 temp = Surface((s.get_width() + 1, s.get_width() + 1), SRCALPHA) | 187 temp = Surface((s.get_width() + 1, s.get_height() + 1), SRCALPHA) |
188 temp.fill((255, 255, 255, 0)) | 188 temp.fill((255, 255, 255, 0)) |
189 temp.blit(s, (1, 1)) | 189 temp.blit(s, (1, 1)) |
190 temp.blit(self.text_surface, (0, 0)) | 190 temp.blit(self.text_surface, (0, 0)) |
191 self.text_surface = temp | 191 self.text_surface = temp |
192 size = [s + 2 for s in size] | 192 size = [s + 2 for s in size] |