Mercurial > fife-parpg
comparison engine/python/fife/extensions/basicapplication.py @ 566:90d369c788c0
Updated the basicapplication extension to initialize pychan and modal execution. Also fixed the demos and editor to reflect this change.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Mon, 28 Jun 2010 15:43:42 +0000 |
parents | 00aa20dc8b7f |
children | 855ad500f991 |
comparison
equal
deleted
inserted
replaced
565:8d0a4e87f24d | 566:90d369c788c0 |
---|---|
28 """ | 28 """ |
29 | 29 |
30 from fife import fife | 30 from fife import fife |
31 from fife.extensions import fifelog | 31 from fife.extensions import fifelog |
32 from fife.extensions.serializers.xmlanimation import XMLAnimationLoader | 32 from fife.extensions.serializers.xmlanimation import XMLAnimationLoader |
33 from fife.extensions import pychan | |
33 from fife.extensions.fife_settings import Setting | 34 from fife.extensions.fife_settings import Setting |
34 | 35 |
35 class ExitEventListener(fife.IKeyListener): | 36 class ExitEventListener(fife.IKeyListener): |
36 """ | 37 """ |
37 Default, rudimentary event listener. | 38 Default, rudimentary event listener. |
83 self.engine.init() | 84 self.engine.init() |
84 | 85 |
85 self._animationloader = XMLAnimationLoader(self.engine.getImagePool(), self.engine.getVFS()) | 86 self._animationloader = XMLAnimationLoader(self.engine.getImagePool(), self.engine.getVFS()) |
86 self.engine.getAnimationPool().addResourceLoader(self._animationloader) | 87 self.engine.getAnimationPool().addResourceLoader(self._animationloader) |
87 | 88 |
89 pychan.init(self.engine, debug=self._setting.get("FIFE", "PychanDebug", False)) | |
90 pychan.setupModalExecution(self.mainLoop,self.breakFromMainLoop) | |
91 | |
88 self.quitRequested = False | 92 self.quitRequested = False |
89 self.breakRequested = False | 93 self.breakRequested = False |
90 self.returnValues = [] | 94 self.returnValues = [] |
91 | 95 |
92 def loadSettings(self): | 96 def loadSettings(self): |
93 """ | 97 """ |
94 Load the settings from a python file and load them into the engine. | 98 Load the settings from a python file and load them into the engine. |
95 Called in the ApplicationBase constructor. | 99 Called in the ApplicationBase constructor. |
96 """ | 100 """ |