Mercurial > fife-parpg
diff engine/extensions/pychan/__init__.py @ 255:51cc05d862f2
Merged editor_rewrite branch to trunk.
This contains changes that may break compatibility against existing clients.
For a list of changes that may affect your client, see: http://wiki.fifengine.de/Changes_to_pychan_and_FIFE_in_editor_rewrite_branch
author | cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Mon, 08 Jun 2009 16:00:02 +0000 |
parents | 92c7ce181881 |
children | 48c99636453e |
line wrap: on
line diff
--- a/engine/extensions/pychan/__init__.py Wed Jun 03 19:29:52 2009 +0000 +++ b/engine/extensions/pychan/__init__.py Mon Jun 08 16:00:02 2009 +0000 @@ -253,18 +253,20 @@ ### Initialisation ### manager = None -def init(engine,debug=False): +def init(engine,debug=False, compat_layout=False): """ This has to be called before any other pychan methods can be used. It sets up a manager object which is available under pychan.manager. @param engine: The FIFE engine object. + @param debug: bool - Enables and disables debugging output. Default is False. + @param compat_layout: bool - Enables and disables compat layout. Default is False. """ from compat import _munge_engine_hook from internal import Manager global manager - manager = Manager(_munge_engine_hook(engine),debug) + manager = Manager(_munge_engine_hook(engine),debug,compat_layout) # XML Loader @@ -357,7 +359,7 @@ self.indent = self.indent[:-4] if manager.debug: print self.indent + "</%s>" % name if self.stack.pop() in ('gui_element','spacer'): - self.root = self.root._parent or self.root + self.root = self.root.parent or self.root def loadXML(filename_or_stream): """