comparison controllerbase.py @ 2:06145a6ee387

Fixed resource path dependencies issue that caused PARPG to crash on start. * PARPG should now run without issue (system installation not tested). * Utilized FIFE's VFS module to remove path dependencies from most PARPG modules. * The new parpg.vfs module is a singleton with a single global variable, VFS, which is a reference to the global VFS instance. Although a singleton is not ideal it should be replaced once PARPG's core code is refactored. * The parpg.vfs singleton is initialized in the parpg.applicaiton.PARPGApplication class with the absolute path to the data directory via the parpg.settings module and corresponding configuration file. * A new DataPath entry was added to the default system configuration file template under the [parpg] section to support the new parpg.vfs module. * Updated the parpg-assets subrepo to revision 3 to fix some dialog file format issues (for details see commit message for parpg-assets). * Fixed a few bugs in the parpg.dialogueparsers.YAMLDialogueParser class related to exception handling.
author M. George Hansen <technopolitica@gmail.com>
date Mon, 06 Jun 2011 15:56:14 -1000
parents 7a89ea5404b1
children 708a6f651c31
comparison
equal deleted inserted replaced
1:4912a6f97c52 2:06145a6ee387
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details. 11 # GNU General Public License for more details.
12 12
13 # You should have received a copy of the GNU General Public License 13 # You should have received a copy of the GNU General Public License
14 # along with PARPG. If not, see <http://www.gnu.org/licenses/>. 14 # along with PARPG. If not, see <http://www.gnu.org/licenses/>.
15 import os
16 from fife import fife 15 from fife import fife
17 16
18 from parpg.common.listeners.key_listener import KeyListener 17 from parpg.common.listeners.key_listener import KeyListener
19 from parpg.common.listeners.mouse_listener import MouseListener 18 from parpg.common.listeners.mouse_listener import MouseListener
20 from parpg.common.listeners.command_listener import CommandListener 19 from parpg.common.listeners.command_listener import CommandListener
81 cursor.setDrag(cursor_type, zero_cursor_id) 80 cursor.setDrag(cursor_type, zero_cursor_id)
82 81
83 def resetMouseCursor(self): 82 def resetMouseCursor(self):
84 """Reset cursor to default image. 83 """Reset cursor to default image.
85 @return: None""" 84 @return: None"""
86 image = os.path.join(self.model.settings.system_path, 85 image = '/'.join(['gui/cursors/',
87 self.model.settings.parpg.GuiPath, 86 self.model.settings.parpg.CursorDefault])
88 self.model.settings.parpg.CursorPath,
89 self.model.settings.parpg.CursorDefault)
90 self.setMouseCursor(image, image) 87 self.setMouseCursor(image, image)
91 88
92 def onStop(self): 89 def onStop(self):
93 """Called when the controller is removed from the list""" 90 """Called when the controller is removed from the list"""
94 pass 91 pass