comparison 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
comparison
equal deleted inserted replaced
149:86656563555e 150:80672955ab70
66 @param dummy_image: ??? 66 @param dummy_image: ???
67 @type type: string 67 @type type: string
68 @param type: ??? 68 @param type: ???
69 @return: None""" 69 @return: None"""
70 cursor = self.engine.getCursor() 70 cursor = self.engine.getCursor()
71 cursor_type = fife.CURSOR_IMAGE 71 img_manager = self.engine.getImageManager()
72 img_pool = self.engine.getImagePool()
73 if(mc_type == "target"): 72 if(mc_type == "target"):
74 target_cursor_id = img_pool.addResourceFromFile(image) 73 target_cursor_id = img_manager.load(image)
75 dummy_cursor_id = img_pool.addResourceFromFile(dummy_image) 74 dummy_cursor_id = img_manager.load(dummy_image)
76 cursor.set(cursor_type, dummy_cursor_id) 75 cursor.set(dummy_cursor_id)
77 cursor.setDrag(cursor_type, target_cursor_id, -16, -16) 76 cursor.setDrag(target_cursor_id, -16, -16)
78 else: 77 else:
79 cursor_type = fife.CURSOR_IMAGE 78 cursor_type = fife.CURSOR_IMAGE
80 zero_cursor_id = img_pool.addResourceFromFile(image) 79 zero_cursor_id = img_manager.load(image)
81 cursor.set(cursor_type, zero_cursor_id) 80 cursor.set(zero_cursor_id)
82 cursor.setDrag(cursor_type, zero_cursor_id) 81 cursor.setDrag(zero_cursor_id)
83 82
84 def resetMouseCursor(self): 83 def resetMouseCursor(self):
85 """Reset cursor to default image. 84 """Reset cursor to default image.
86 @return: None""" 85 @return: None"""
87 image = '/'.join(['gui/cursors/', 86 image = '/'.join(['gui/cursors/',