Mercurial > parpg-core
diff src/parpg/controllerbase.py @ 182:59c9ce2b8351
PARPG now works with, and needs Fife 0.3.3.
author | KarstenBock@gmx.net |
---|---|
date | Tue, 11 Oct 2011 14:47:37 +0200 |
parents | 29869273f9e1 |
children |
line wrap: on
line diff
--- a/src/parpg/controllerbase.py Mon Oct 10 15:13:56 2011 +0200 +++ b/src/parpg/controllerbase.py Tue Oct 11 14:47:37 2011 +0200 @@ -68,18 +68,17 @@ @param type: ??? @return: None""" cursor = self.engine.getCursor() - cursor_type = fife.CURSOR_IMAGE - img_pool = self.engine.getImagePool() + img_manager = self.engine.getImageManager() if(mc_type == "target"): - target_cursor_id = img_pool.addResourceFromFile(image) - dummy_cursor_id = img_pool.addResourceFromFile(dummy_image) - cursor.set(cursor_type, dummy_cursor_id) - cursor.setDrag(cursor_type, target_cursor_id, -16, -16) + target_cursor_id = img_manager.load(image) + dummy_cursor_id = img_manager.load(dummy_image) + cursor.set(dummy_cursor_id) + cursor.setDrag(target_cursor_id, -16, -16) else: cursor_type = fife.CURSOR_IMAGE - zero_cursor_id = img_pool.addResourceFromFile(image) - cursor.set(cursor_type, zero_cursor_id) - cursor.setDrag(cursor_type, zero_cursor_id) + zero_cursor_id = img_manager.load(image) + cursor.set(zero_cursor_id) + cursor.setDrag(zero_cursor_id) def resetMouseCursor(self): """Reset cursor to default image.