comparison src/parpg/charactercreationcontroller.py @ 30:94cb5843dcbb

Modifications to use the grease manager and modes
author KarstenBock@gmx.net
date Tue, 12 Jul 2011 12:31:53 +0200
parents d60f1dab8469
children 8b3890f17f94
comparison
equal deleted inserted replaced
29:ad18c3f912c5 30:94cb5843dcbb
142 @return: None""" 142 @return: None"""
143 view = GameSceneView(self.engine, self.model) 143 view = GameSceneView(self.engine, self.model)
144 controller = GameSceneController(self.engine, view, self.model, 144 controller = GameSceneController(self.engine, view, self.model,
145 self.application) 145 self.application)
146 self.application.view = view 146 self.application.view = view
147 self.application.switchController(controller) 147 self.application.swap_modes(controller)
148 start_map = self.settings.parpg.Map 148 start_map = self.settings.parpg.Map
149 self.model.changeMap(start_map) 149 self.model.changeMap(start_map)
150 150
151 def cancelNewGame(self): 151 def cancelNewGame(self):
152 """Exit the character creation view and return the to main menu. 152 """Exit the character creation view and return the to main menu.
157 from mainmenuview import MainMenuView 157 from mainmenuview import MainMenuView
158 view = MainMenuView(self.engine, self.model) 158 view = MainMenuView(self.engine, self.model)
159 controller = MainMenuController(self.engine, view, self.model, 159 controller = MainMenuController(self.engine, view, self.model,
160 self.application) 160 self.application)
161 self.application.view = view 161 self.application.view = view
162 self.application.switchController(controller) 162 self.application.activate_mode(controller)
163 163
164 def onStop(self): 164 def on_deactivate(self):
165 """Called when the controller is removed from the list. 165 """Called when the controller is removed from the list.
166 @return: None""" 166 @return: None"""
167 self.view.hide() 167 self.view.hide()
168 168
169 @property 169 @property