diff src/parpg/application.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 0443ab9533ce
line wrap: on
line diff
--- a/src/parpg/application.py	Mon Aug 01 08:44:31 2011 +0200
+++ b/src/parpg/application.py	Wed Aug 03 22:57:52 2011 +0200
@@ -19,6 +19,7 @@
 from fife import fife
 from fife.extensions import pychan
 from fife.extensions.serializers.xmlanimation import XMLAnimationLoader
+from fife.extensions.basicapplication import ApplicationBase
 
 from parpg import console, vfs
 from parpg.font import PARPGFont
@@ -103,7 +104,7 @@
             self.quit = True
             command.consume()
 
-class PARPGApplication(FifeManager):
+class PARPGApplication(ApplicationBase):
     """Main Application class
        We use an MVC model model
        self.gamesceneview is our view,self.model is our model
@@ -112,8 +113,8 @@
     def __init__(self, setting):
         """Initialise the instance.
            @return: None"""
-	self.modes = []
 	self._setting = setting
+	self.manager = FifeManager()
         self.engine = fife.Engine()
         self.loadSettings()
         self.engine.init()
@@ -146,7 +147,7 @@
         controller = MainMenuController(self.engine, self.view, self.model, 
                                         self)
         #controller.initHud()
-        self.push_mode(controller)
+        self.manager.push_mode(controller)
         self.listener = ApplicationListener(self.event_listener,
                                             self.engine, 
                                             self.view, 
@@ -211,4 +212,4 @@
         if self.listener.quit:
             self.breakRequested = True #pylint: disable-msg=C0103
         else:
-            FifeManager._pump(self)
+            self.manager._pump()