# HG changeset patch # User Neil Muller # Date 1252168051 0 # Node ID 010ab166c5825cc1f81786c9ca1da6b38082b606 # Parent d037e37c5240df58743bbbc05d253f1ba5743be9 Add killed fox count to gameover. Tweak spacing diff -r d037e37c5240 -r 010ab166c582 gamelib/gameover.py --- a/gamelib/gameover.py Sat Sep 05 16:19:38 2009 +0000 +++ b/gamelib/gameover.py Sat Sep 05 16:27:31 2009 +0000 @@ -94,6 +94,7 @@ message = random.choice(LEFT_MESSAGES) self.td(gui.Label(message, color=constants.FG_COLOR), colspan=3) + self.add_spacer() # show the scoreboard for highscore in scoreboard: @@ -108,6 +109,11 @@ color=constants.FG_COLOR)) self.td(gui.Label(" Eggs : %d" % gameboard.eggs, color=constants.FG_COLOR)) + self.add_spacer() + self.tr() + self.td(gui.Label("You killed %d foxes" % gameboard.killed_foxes, + color=constants.FG_COLOR), colspan=3) + self.add_spacer() self.tr() self.td(gui.Label("Final score : %d" % score, color=constants.FG_COLOR), colspan=3) @@ -120,8 +126,7 @@ self.td(gui.Label("Pity, you could have made the high scores", color=constants.FG_COLOR), colspan=3) - self.tr() - self.td(gui.Spacer(0, 50), colspan=3) + self.add_spacer(50) return_button = gui.Button("Return to Main Menu") return_button.connect(gui.CLICK, return_pressed) @@ -143,3 +148,7 @@ self.tr() self.td(quit_button, **td_kwargs) + + def add_spacer(self, height=5): + self.tr() + self.td(gui.Spacer(0, height), colspan=3)