Warning: changing the mouse cursor

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
User avatar
thelastsecret
Regular
Posts: 53
Joined: Tue Mar 01, 2022 1:32 pm
itch: thelastsecret
Contact:

Warning: changing the mouse cursor

#1 Post by thelastsecret » Sun Oct 09, 2022 2:38 pm

A warning for those of you who change the mouse cursor in-game:

I had in a previous version of Ren'Py changed the mouse cursor using something like
setattr(config, "mouse", {"1": [("images/1.png", 20, 20)]})
This somehow doesn't work anymore in version 7.5.1 of Ren'Py! There is no error message, but the cursor just doesn't change.
Instead one can use
define config.mouse['1'] = [("images/1.png", 20, 20)]
which works just fine.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Warning: changing the mouse cursor

#2 Post by Ocelot » Sun Oct 09, 2022 4:48 pm

... which is literally how you are supposed to do that, this method is described in the original documentation: https://www.renpy.org/doc/html/mouse.html

I do not know how you got to the first version, but it wasn't supposed to work for at least a few years. Any appearances of this to work are just coincidence.
< < insert Rick Cook quote here > >

Post Reply

Who is online

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