diff demos/shooter/scripts/gui/guis.py @ 496:987307d12235

Added the fife_settings.py extension. This provides a small utility class for loading and saving settings along with a dialog box for setting screen resolution and other things. Updated the shooter demo and rio_de_hola to use the new settings extension.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 12 May 2010 16:09:46 +0000
parents c4168eb47a44
children
line wrap: on
line diff
--- a/demos/shooter/scripts/gui/guis.py	Tue May 11 21:30:55 2010 +0000
+++ b/demos/shooter/scripts/gui/guis.py	Wed May 12 16:09:46 2010 +0000
@@ -29,8 +29,9 @@
 from xml.sax.xmlreader import AttributesNSImpl
 
 class MainMenu(object):
-	def __init__(self, world):
+	def __init__(self, world, setting):
 		self._world = world
+		self._setting = setting
 		self._widget = pychan.loadXML('gui/mainmenu.xml')
 
 		self._continue = self._widget.findChild(name="continue")
@@ -44,6 +45,7 @@
 		eventMap = {
 			'continue': self._world.continueGame,
 			'new_game': self._world.newGame,
+			'settings': self._setting.onOptionsPress,
 			'credits': self._world.showCredits,
 			'high_scores': self._world.showHighScores,
 			'quit': self._world.quit,