comparison gamelib/gui_base.py @ 71:20b01d100ff5

fucking pep8
author Rizmari Versfeld <rizziepit@gmail.com>
date Tue, 08 May 2012 23:11:03 +0200
parents 442a1bf9b14e
children 22b65c943712
comparison
equal deleted inserted replaced
70:442a1bf9b14e 71:20b01d100ff5
168 self.font.set_bold(True) 168 self.font.set_bold(True)
169 self.text_surface = self.font.render(self.text, True, (0, 0, 0)) 169 self.text_surface = self.font.render(self.text, True, (0, 0, 0))
170 size = self.font.size(self.text) 170 size = self.font.size(self.text)
171 if self.shadow: 171 if self.shadow:
172 s = self.font.render(self.text, True, (128, 128, 128)) 172 s = self.font.render(self.text, True, (128, 128, 128))
173 temp_surface = Surface((s.get_width() + 2, s.get_width() + 2), SRCALPHA) 173 temp = Surface((s.get_width() + 2, s.get_width() + 2), SRCALPHA)
174 temp_surface.fill((255, 255, 255, 0)) 174 temp.fill((255, 255, 255, 0))
175 temp_surface.blit(s, (2, 2)) 175 temp.blit(s, (2, 2))
176 temp_surface.blit(self.text_surface, (0, 0)) 176 temp.blit(self.text_surface, (0, 0))
177 self.text_surface = temp_surface 177 self.text_surface = temp
178 size = [s + 2 for s in size] 178 size = [s + 2 for s in size]
179 self.text_offset = ((self.rect[2] - size[0]) / 2, 179 self.text_offset = ((self.rect[2] - size[0]) / 2,
180 (self.rect[3] - size[1]) / 2) 180 (self.rect[3] - size[1]) / 2)
181 self.font.set_bold(False) 181 self.font.set_bold(False)
182 182