I'm trying to figure out how to add the ability to switch custom cursors depending on the situation, for example I want only specific imagebuttons in my game to show a hand custom cursor. I tried looking at the wiki but the "Hardware Mouse Cursor" section doesn't explain how to achieve what I want.
Wiki: https://www.renpy.org/doc/html/mouse.html
This is the code I've added:
define config.mouse = { }
define config.mouse['default'] = [ ( "images/default.png", 0, 0) ]
define config.mouse['button' ] = [ ( "images/white_hand.png", 0, 0 ) ]
[SOLVED] Custom cursor for specific buttons
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.
-
- Newbie
- Posts: 4
- Joined: Tue May 30, 2023 10:51 am
- itch: python
- Contact:
[SOLVED] Custom cursor for specific buttons
Last edited by DeftestHawk on Mon May 13, 2024 9:32 am, edited 1 time in total.
-
- Newbie
- Posts: 4
- Joined: Tue May 30, 2023 10:51 am
- itch: python
- Contact:
Re: Custom cursors?
I figured it out
define config.mouse = { }
define config.mouse['default'] = [ ( "images/default.png", 0, 0) ]
define config.mouse['white_hand' ] = [ ( "images/white_hand.png", 0, 0 ) ]
screen home:
imagebutton auto "images/home/miu01_%s.png" xpos 357 ypos 1143 action [Show("miu_home_main")] mouse "white_hand"
define config.mouse = { }
define config.mouse['default'] = [ ( "images/default.png", 0, 0) ]
define config.mouse['white_hand' ] = [ ( "images/white_hand.png", 0, 0 ) ]
screen home:
imagebutton auto "images/home/miu01_%s.png" xpos 357 ypos 1143 action [Show("miu_home_main")] mouse "white_hand"
Who is online
Users browsing this forum: Amazon [Bot], Google [Bot]