Hello everyone,
I have a problem with changing cursor in mid game....
I need change mouse pointer to zoomer for a while and then change it back to standart cursor.
I'm using this code, but it doesnt work properly.
I have a problem with changing cursor in mid game....
I need change mouse pointer to zoomer for a while and then change it back to standart cursor.
I'm using this code, but it doesnt work properly.
Code:
init 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", 0, 0)]})
elif type == "2":
setattr(config, "mouse", {"default": [("images/2.png", 0, 0)]})
if not hasattr(persistent, "mouse"):
change_cursor()
else:
change_cursor(persistent.mouse)
Code:
$ change_cursor("1") #Here cursor must change to zoomer
elina "Some text"
scene w058_1
elina "Some text"
$ change_cursor() #Here cursor must change to standart