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: 117
Joined: Tue Mar 01, 2022 1:32 pm
Completed: The Last Secret
Projects: Sweet Science – The Girls from Silversee Castle
itch: thelastsecret
Discord: TheLastSecret #5266
Contact:

Warning: changing the mouse cursor

#1 Post by thelastsecret »

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
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Warning: changing the mouse cursor

#2 Post by Ocelot »

... 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 > >

User avatar
Li yuanlin
Regular
Posts: 88
Joined: Sat Aug 04, 2018 8:42 pm
Location: Hong Kong
Contact:

Re: Warning: changing the mouse cursor

#3 Post by Li yuanlin »

As Ocelot said, that's question,however, you can use "mouse" property in specific screen such as imagemap in a screen:

Code: Select all

define config.mouse["imagemap"] = [("gui/magnifying.png",0,0)]
……
imagemap:
            ground "inv_letter_1.png"
            hover "inv_letter_1.png"

            hotspot (321,183,956,514) mouse "imagemap" action [Jump("inv1_letter_clicked")]#[Jump("inv1_test",action=1)]
            hotspot (500,364,580,384) mouse "imagemap" action [Jump("inv1_yama_name_clicked")]
            hotspot (773,307,890,415) mouse "imagemap" action [Jump("inv1_blood_clicked")]
            hotspot (695,431,805,455) mouse "imagemap" action [Jump("inv1_signature_clicked")]
            hotspot (806,407,868,500) mouse "imagemap" action [Jump("inv1_blood_down_clicked")]
stay hungry,stay foolish.

Post Reply

Who is online

Users browsing this forum: Google [Bot]