screen game_menu_button():
key "K_ESCAPE" action ShowMenu("game_menu")
key "mouseup_3" action ShowMenu("game_menu")
How to change mouse right click fuction?
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.
How to change mouse right click fuction?
I want show game menu screen instead of save screen but don't know how. I did try the menthod below:
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: How to change mouse right click fuction?
You should take a look at customizing how certain keys are mapped to certain actions
https://www.renpy.org/doc/html/keymap.html
You will see that mouseup_3 already is mapped to game_menu.
game_menu = [ 'K_ESCAPE', 'K_MENU', 'mouseup_3' ]
Game_menu is sort of a templet used for different game menus, including save.
It is used in different game menus through a line like this.
use game_menu(title)
When you just call game_menu you get the save menu. I don't know why.
So you need to decide which game_menu you want to call and call that specifically.
If you want to use right click you first need to remove that from the mapping like this.
$ config.keymap['game_menu'].remove('mouseup_3')
Re: How to change mouse right click fuction?
Just set _game_menu_screen variable to desirable screen name (like 'game_menu').
https://www.renpy.org/doc/html/store_va ... enu_screen
Code: Select all
label start:
$ _game_menu_screen = 'game_menu'
Re: How to change mouse right click fuction?
it's working! thank you very very very much!Alex wrote: ↑Fri Jun 19, 2020 1:08 pm Just set _game_menu_screen variable to desirable screen name (like 'game_menu').https://www.renpy.org/doc/html/store_va ... enu_screenCode: Select all
label start: $ _game_menu_screen = 'game_menu'
Re: How to change mouse right click fuction?
Hello again. For some reason it not working anymore after I custom some other screen. It so much like when I use the $ quick_menu = False code, it working at first but not working anymore. I'm really confused at this...Alex wrote: ↑Fri Jun 19, 2020 1:08 pm Just set _game_menu_screen variable to desirable screen name (like 'game_menu').https://www.renpy.org/doc/html/store_va ... enu_screenCode: Select all
label start: $ _game_menu_screen = 'game_menu'
Re: How to change mouse right click fuction?
Try to set it back to 'save' screen to test if it working at all.
If it will show you the save screen then check what you've changed in your 'game_menu' screen.
If not - check the changes you've made in game menu screens.
If this won't help you to solve the issue, provide more information, like the code for your 'game_menu' screen (the screen, you want to show via right click), other customizations of game menu system you've made.
Re: How to change mouse right click fuction?
Hello, thank you for your reply!Alex wrote: ↑Sun Jun 21, 2020 7:10 amTry to set it back to 'save' screen to test if it working at all.
If it will show you the save screen then check what you've changed in your 'game_menu' screen.
If not - check the changes you've made in game menu screens.
If this won't help you to solve the issue, provide more information, like the code for your 'game_menu' screen (the screen, you want to show via right click), other customizations of game menu system you've made.
I tried 'load' and other screen but it not working as well. But my friend recommend I should build the game and see, and it actually still working! Just not working when I lauch it as project.
Thank you again for your patience with me!
Who is online
Users browsing this forum: No registered users