comparison charactercreationcontroller.py @ 17:7b31de1dc964

FifeManager no longer subclasses ApplicationBase PARPGApplication stores an instance of tbe manager instead
author KarstenBock@gmx.net
date Wed, 03 Aug 2011 22:57:52 +0200
parents 708a6f651c31
children c76f03c290f6
comparison
equal deleted inserted replaced
16:5c587a0d9ad7 17:7b31de1dc964
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.swap_modes(controller) 147 self.application.manager.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.activate_mode(controller) 162 self.application.manager.activate_mode(controller)
163 163
164 def on_deactivate(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()