Mercurial > rinkhals
changeset 296:010ab166c582
Add killed fox count to gameover. Tweak spacing
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 16:27:31 +0000 |
parents | d037e37c5240 |
children | 73b9a39e9473 |
files | gamelib/gameover.py |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)