I managed to find this on the internet:
Code: Select all
init 1 python:
def change_cursor(type="default"):
persistent.mouse = type
if type == "default":
setattr(config, "mouse", None)
elif type == "1":
setattr(config, "mouse", {"default": [("images/1.png", 31, 28)]})
elif type == "2":
setattr(config, "mouse", {"default": [("images/2.png", 0, 0)]})
if not hasattr(persistent, "mouse"):
change_cursor()
else:
change_cursor(persistent.mouse)
# The game starts here.
label start:
$ change_cursor()
"Normal Cursor"
$ change_cursor("1")
"Cursor 1"
$ change_cursor("2")
"Cursor 2"
returnand then tried to "tweak" it for my purpose:
Code: Select all
screen testing():
imagemap:
ground "border_female"
hotspot (0, 0, 247, 270) hovered Function(change_cursor,"1")
init 1 python:
def change_cursor(type="default"):
persistent.mouse = type
if type == "default":
setattr(config, "mouse", None)
elif type == "1":
setattr(config, "mouse", {"default": [("magnifier_cursor.png", 0, 0)]})
if not hasattr(persistent, "mouse"):
change_cursor()
else:
change_cursor(persistent.mouse) Can you guys help me out :/ ?
Thanks in advance !