diff controllerbase.py @ 150:80672955ab70

PARPG now works with, and needs Fife 0.3.3.
author KarstenBock@gmx.net
date Tue, 11 Oct 2011 14:47:37 +0200
parents 0411a4bcceee
children b3b82c2aebee
line wrap: on
line diff
--- a/controllerbase.py	Mon Oct 10 15:12:33 2011 +0200
+++ b/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.