How would i set up a custom mouse pointer in renpy 6.99.11?

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
TheOtherNewGuy
Regular
Posts: 26
Joined: Wed Nov 16, 2016 2:53 am
Contact:

How would i set up a custom mouse pointer in renpy 6.99.11?

#1 Post by TheOtherNewGuy »

Found this section in the documentation, but I don't see any specifics about what to type.
Ren'Py Documentation wrote: define config.mouse = None
This variable controls the use of user-defined mouse cursors. If None, the system mouse is used, which is usually a black-and-white mouse cursor.

Otherwise, this should be a dictionary giving the mouse animations for various mouse types. Keys used by the default library include "default", "say", "with", "menu", "prompt", "imagemap", "pause", "mainmenu", and "gamemenu". The "default" key should always be present, as it is used when a more specific key is absent.

Each value in the dictionary should be a list of (image, xoffset, offset) tuples, representing frames.
If I had to guess, I'd say you type "define config.mouse" in the options.rpy? How exactly would you refer to your image file.

define config.mouse = ???

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: How would i set up a custom mouse pointer in renpy 6.99.

#2 Post by Divona »

It does stated in the documentation that it take Python dictionaries.
https://docs.python.org/2/tutorial/data ... ctionaries

Code: Select all

define config.mouse = {
    "default" : [("gui/cursor_default.png", 0, 0)],
    "say" : [("gui/cursor_say.png", 0, 0)]
    }
Completed:
Image

TheOtherNewGuy
Regular
Posts: 26
Joined: Wed Nov 16, 2016 2:53 am
Contact:

Re: How would i set up a custom mouse pointer in renpy 6.99.

#3 Post by TheOtherNewGuy »

Divona wrote:It does stated in the documentation that it take Python dictionaries.
https://docs.python.org/2/tutorial/data ... ctionaries

Code: Select all

define config.mouse = {
    "default" : [("gui/cursor_default.png", 0, 0)],
    "say" : [("gui/cursor_say.png", 0, 0)]
    }
I'm still new to coding and that link scared the hell out of me.

Thanks for the code to change the mouse. It worked :) I noticed you put two lines, default and say... did you just write the two to show that the cursor picture can change if you hover it over something? I'm not sure.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: How would i set up a custom mouse pointer in renpy 6.99.

#4 Post by Divona »

TheOtherNewGuy wrote:I noticed you put two lines, default and say... did you just write the two to show that the cursor picture can change if you hover it over something? I'm not sure.
"default" is what the cursor will be showing most of the time as default.
"say" is the cursor that will be show during the narrative text.

You can try change the keyword around and see when the cursor changes. The list are "default", "say", "with", "menu", "prompt", "imagemap", "pause", "mainmenu", and "gamemenu". It kinda self explanation. The "default" key should always be present, as it is used when a more specific key is absent.

If you just want "default" cursor, then you don't need to add anything else. Just remove "say" line.
Completed:
Image

Post Reply

Who is online

Users browsing this forum: Ocelot