# HG changeset patch # User Rizmari Versfeld # Date 1336688915 -7200 # Node ID 3e02a8ccd72b278e5d5957f578920ba6db0da42e # Parent 8fbd0abb7744e797695d65a1dbbdf6ff33b78fa1 pep8 and pyflakes diff -r 8fbd0abb7744 -r 3e02a8ccd72b gamelib/gui.py --- a/gamelib/gui.py Fri May 11 00:23:26 2012 +0200 +++ b/gamelib/gui.py Fri May 11 00:28:35 2012 +0200 @@ -33,14 +33,14 @@ HEIGHT = 64 BG_IMAGE_NORMAL = image.load(data.filepath('images/research_normal.png')) BG_IMAGE_DOWN = image.load(data.filepath('images/research_down.png')) - + def __init__(self, pos, name): rect = (pos[0], pos[1], self.WIDTH, self.HEIGHT) n_icon = image.load(data.filepath('images/icons/%s_normal.png' % name)) d_icon = image.load(data.filepath('images/icons/%s_down.png' % name)) n = ImageDrawable(rect, self.BG_IMAGE_NORMAL.copy()) - n.image.blit(n_icon, (0,0)) + n.image.blit(n_icon, (0, 0)) d = ImageDrawable(rect, self.BG_IMAGE_DOWN.copy()) - d.image.blit(d_icon, (0,0)) + d.image.blit(d_icon, (0, 0)) rect2 = (pos[0], pos[1], self.WIDTH, self.HEIGHT) - super(IconButton, self).__init__(rect2, n, d) \ No newline at end of file + super(IconButton, self).__init__(rect2, n, d) diff -r 8fbd0abb7744 -r 3e02a8ccd72b gamelib/mainmenu.py --- a/gamelib/mainmenu.py Fri May 11 00:23:26 2012 +0200 +++ b/gamelib/mainmenu.py Fri May 11 00:28:35 2012 +0200 @@ -72,9 +72,9 @@ self.screen = screen self.background_colour = (0, 0, 0) self.background_image = image.load(data.filepath('images/temp.jpg')) - self.add_child(IconButton((0,0),'rocketry')) - self.add_child(IconButton((64,0),'marinebiology')) - self.add_child(IconButton((128,0),'robotics')) + self.add_child(IconButton((0, 0), 'rocketry')) + self.add_child(IconButton((64, 0), 'marinebiology')) + self.add_child(IconButton((128, 0), 'robotics')) button1 = NewGameButton(self) self.add_child(button1) button2 = QuitButton()