Configurable mouse cursor problem post renpy update

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Gianserpe
Newbie
Posts: 21
Joined: Mon May 27, 2019 4:20 pm
Contact:

Configurable mouse cursor problem post renpy update

#1 Post by Gianserpe »

Hi everyone, I am writing about a problem that arose after the renpay update.
Since I updated to the latest version, some portions of the code no longer work correctly
In this specific case I have problems with changing the mouse cursor.
I made sure, based on where you were, the mouse cursor changed. The code is this

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/spray_ruo.png", 0, 0)]})
    if not hasattr(persistent, "mouse"):
        change_cursor()
    else:
        change_cursor(persistent.mouse) 
		
label start:
    $ change_cursor()
    "Now I modify the slider"
    $ change_cursor("1")
    "Now I reset it normally"
    $ change_cursor()
The problem is that now it doesn't work anymore and I don't understand why, does anyone know the answer?
Or do you know of an alternative method to achieve this?

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]