Mercurial > fife-parpg
comparison clients/editor/scripts/mapview.py @ 282:0adf9423062e
* Buttons and functions for importing objects in the editor
* Fixed an index overflow bug in FileBrowser which could occur when selectDirs was enabled
* Removed unused import functions from MapView
author | cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 17 Jun 2009 01:34:59 +0000 |
parents | 51cc05d862f2 |
children | 7ddec4ce99b3 |
comparison
equal
deleted
inserted
replaced
281:0b9b493138a8 | 282:0adf9423062e |
---|---|
81 events.postSave.send(sender=self, mapview=self) | 81 events.postSave.send(sender=self, mapview=self) |
82 | 82 |
83 def close(self): | 83 def close(self): |
84 """ Closes the mapview """ | 84 """ Closes the mapview """ |
85 pass | 85 pass |
86 | 86 |
87 | |
88 def importFile(self, path): | |
89 """ Imports a file supported by the provided loaders. """ | |
90 loaders.loadImportFile(path, self._editor.getEngine()) | |
91 | |
92 def importDir(self, path, recursive=True): | |
93 """ Imports an entire directory supported by the provided loaders. """ | |
94 self.importlist.append(path) | |
95 if recursive is True: | |
96 loaders.loadImportDirRec(path, self._editor.getEngine()) | |
97 else: | |
98 loaders.loadImportDir(path, self._editor.getEngine()) | |
99 | 87 |