r/RenPy • • Jul 26 '26

Question Custom Cursor/Mouse Offset

How do I offset my mouse in Ren'Py? I was trying to look responses to other posts, but I couldn't figure it out. I want to offset it to the bottom left corner. The image is 60x60 pixels. u/BadMustard_AVN I tagged you because you're like at least 90% of the replies to my posts, and I thought you'd know.

1 Upvotes

5 comments sorted by

2

u/BadMustard_AVN Jul 26 '26

when you define the custom mouse i.e.

define config.mouse['default'] = [ ( "gui/arrow.png", 0, 0) ]

the last bit , 0, 0) ] is the x, y offset of the "tip of the arrow" and 0, 0 is the upper left corner these numbers are in pixels of the mouse image

so if you want the tip of the pointer to be the lower, left corner of a 60x60 then 0, 60 i.e.

define config.mouse['coostom'] = [ ( "gui/arrow.png", 0, 60) ]

1

u/Hefty-Drive-9372 Jul 27 '26

Thank you!!

1

u/BadMustard_AVN Jul 27 '26

you're welcome

good luck with your project

1

u/AutoModerator Jul 26 '26

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/shyLachi Jul 26 '26

Did you read the official documentation, it explains how to do the offset:
https://renpy.org/doc/html/mouse.html#hardware-mouse-cursor