Mercurial > parpg-core
comparison src/parpg/mainmenucontroller.py @ 39:8b3890f17f94
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 | 94cb5843dcbb |
children |
comparison
equal
deleted
inserted
replaced
38:bd1e3b743518 | 39:8b3890f17f94 |
---|---|
53 view = CharacterCreationView(self.engine, self.model, | 53 view = CharacterCreationView(self.engine, self.model, |
54 self.model.settings) | 54 self.model.settings) |
55 controller = CharacterCreationController(self.engine, view, self.model, | 55 controller = CharacterCreationController(self.engine, view, self.model, |
56 self.application) | 56 self.application) |
57 self.application.view = view | 57 self.application.view = view |
58 self.application.swap_modes(controller) | 58 self.application.manager.swap_modes(controller) |
59 | 59 |
60 # def newGame(self): | 60 # def newGame(self): |
61 # """Starts a new game""" | 61 # """Starts a new game""" |
62 # view = GameSceneView(self.engine, | 62 # view = GameSceneView(self.engine, |
63 # self.model) | 63 # self.model) |
64 # controller = GameSceneController(self.engine, | 64 # controller = GameSceneController(self.engine, |
65 # view, | 65 # view, |
66 # self.model, | 66 # self.model, |
67 # self.application) | 67 # self.application) |
68 # self.application.view = view | 68 # self.application.view = view |
69 # self.application.swap_modes(controller) | 69 # self.application.manager.swap_modes(controller) |
70 # start_map = self.model.settings.get("PARPG", "Map") | 70 # start_map = self.model.settings.get("PARPG", "Map") |
71 # self.model.changeMap(start_map) | 71 # self.model.changeMap(start_map) |
72 | 72 |
73 def loadGame(self, *args, **kwargs): | 73 def loadGame(self, *args, **kwargs): |
74 """Loads the game state | 74 """Loads the game state |
79 controller = GameSceneController(self.engine, | 79 controller = GameSceneController(self.engine, |
80 view, | 80 view, |
81 self.model, | 81 self.model, |
82 self.application) | 82 self.application) |
83 self.application.view = view | 83 self.application.view = view |
84 self.application.swap_modes(controller) | 84 self.application.manager.swap_modes(controller) |
85 controller.loadGame(*args, **kwargs) | 85 controller.loadGame(*args, **kwargs) |
86 | 86 |
87 def on_deactivate(self): | 87 def on_deactivate(self): |
88 """Called when the controller is removed from the list""" | 88 """Called when the controller is removed from the list""" |
89 self.view.hideMenu() | 89 self.view.hideMenu() |