Hello!
A bit of an odd question, but I am making a game that makes heavy use of Pygame, and one of the sections requires the mouse. Not a problem, except that I am trying to implement a custom mouse cursor. When this is in place, when Pygame runs, it doesn't display the cursor!
So I was wondering if there was any way to set the config.mouse at the beginning of the game, swap it out for default before the game is imported, and swap it back in after.
I've tried both having it check for a "pygame_active" variable and set the config accordingly, and just doing it directly before the game runs, to no avail.
It's not super critical, but it's a cute cursor and I'd like to be able to keep it in without making the minigame unplayable.
Any help would be appreciated ^^ Thank you
Dynamic Cursor Config
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.
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.
-
- Miko-Class Veteran
- Posts: 636
- Joined: Thu May 14, 2009 8:15 pm
- Projects: Castle of Arhannia
- Contact:
Re: Dynamic Cursor Config
have you tried using pygame to change it?
http://www.pygame.org/docs/ref/mouse.ht ... set_cursor
alternatively, you could try to hide the mouse cursor and then put your own image in place of it.
http://www.pygame.org/docs/ref/mouse.ht ... set_cursor
alternatively, you could try to hide the mouse cursor and then put your own image in place of it.
- Mole-chan
- Veteran
- Posts: 333
- Joined: Thu Aug 27, 2009 12:46 am
- Completed: DUAEL, Escape from Puzzlegate
- Projects: A Bird with Gold-Mended Wings
- Deviantart: mole-chan
- Skype: mole-chan
- itch: moleworks
- Contact:
Re: Dynamic Cursor Config
I have tried using Pygame directly. None of the cursors work when set, they always complain that some arguments are missing. I'm guessing the way it formats the arguments with the asterisk instead of listing all of them confuses Ren'py. And some arguments (namely hotspot) don't have that much documentation.KimiYoriBaka wrote:have you tried using pygame to change it?
http://www.pygame.org/docs/ref/mouse.ht ... set_cursor
alternatively, you could try to hide the mouse cursor and then put your own image in place of it.
oh? How would I go about doing that?
-
- Miko-Class Veteran
- Posts: 636
- Joined: Thu May 14, 2009 8:15 pm
- Projects: Castle of Arhannia
- Contact:
Re: Dynamic Cursor Config
try using this to make the cursor invisible:
http://www.pygame.org/docs/ref/mouse.ht ... et_visible
if that works, they you can use the pos value from any MOUSEMOTION events to check where the cursor is and place whatever image you want there.
http://www.pygame.org/docs/ref/mouse.ht ... et_visible
if that works, they you can use the pos value from any MOUSEMOTION events to check where the cursor is and place whatever image you want there.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]