changeset 568:e813365af567

Add quit button to toolbar
author Neil Muller <drnlmuller@gmail.com>
date Sat, 28 Nov 2009 19:37:08 +0000
parents 37f7454518d5
children 3ec614e6fd4a
files gamelib/toolbar.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/toolbar.py	Sat Nov 28 19:33:41 2009 +0000
+++ b/gamelib/toolbar.py	Sat Nov 28 19:37:08 2009 +0000
@@ -205,6 +205,9 @@
         """Load game 'dialog'."""
         savegame.RestoreDialog(self.gameboard.restore_game).open()
 
+    def quit_game(self):
+        self.gameboard._do_quit()
+
     update_cash_counter = mkcountupdate('cash_counter')
     update_wood_counter = mkcountupdate('wood_counter')
     update_fox_counter = mkcountupdate('killed_foxes')
@@ -302,6 +305,7 @@
         self.add_heading("Game")
         self.add_tool("Save Game", self.save_game)
         self.add_tool("Load Game", self.load_game)
+        self.add_tool("Quit", self.quit_game)
 
         self.add_heading(" ")
         ## Dear pgu, is there a better way to get the current height?