How to change right click to quit? [SOLVED]

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
User avatar
AsHLeX
Miko-Class Veteran
Posts: 556
Joined: Wed Dec 25, 2013 1:09 pm
Completed: Starlight Dreamers, Mysterious Melody, Town of Memories, Marked, To Fly, The Change, Him From The Past, A Forgotten Memory
Projects: Cafe Mysteria
Location: Malaysia
Contact:

How to change right click to quit? [SOLVED]

#1 Post by AsHLeX »

First off, thank you for reading this. If it helps, I'm using the old GUI for ren'py.
How do I change the right clicking in ren'py (which automatically goes to the save file) and redirect it to the "Are you sure you want to quit?" screen.
I know that to disable right clicking I can use

Code: Select all

$_game_menu_screen = None
but I'm not sure what screen to put in this if I want it to go to the quit screen.

Thank you!
Last edited by AsHLeX on Wed Feb 07, 2018 6:20 am, edited 1 time in total.
Image
New demo out 24/12/23!!

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How to change right click to quit?

#2 Post by Imperf3kt »

Hmm, I think there's two options - that I can think of.

One is to use the code you listed, to open a custom screen with the quit message and some buttons
The other is to edit the function of the right click. I don't have any experience with this, but I think its probably the more "correct" way to handle what you want.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
AsHLeX
Miko-Class Veteran
Posts: 556
Joined: Wed Dec 25, 2013 1:09 pm
Completed: Starlight Dreamers, Mysterious Melody, Town of Memories, Marked, To Fly, The Change, Him From The Past, A Forgotten Memory
Projects: Cafe Mysteria
Location: Malaysia
Contact:

Re: How to change right click to quit?

#3 Post by AsHLeX »

Thanks for the help!
I ended up just making a custom screen with the quit message using that code ^^".
Image
New demo out 24/12/23!!

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: How to change right click to quit? [SOLVED]

#4 Post by IrinaLazareva »

about second option...

Code: Select all

init python:
    config.keymap['game_menu'].remove('mouseup_3')
    config.keymap['quit'].append('mouseup_3')
https://renpy.org/doc/html/keymap.html# ... the-keymap

User avatar
AsHLeX
Miko-Class Veteran
Posts: 556
Joined: Wed Dec 25, 2013 1:09 pm
Completed: Starlight Dreamers, Mysterious Melody, Town of Memories, Marked, To Fly, The Change, Him From The Past, A Forgotten Memory
Projects: Cafe Mysteria
Location: Malaysia
Contact:

Re: How to change right click to quit? [SOLVED]

#5 Post by AsHLeX »

Thank you IrinaLazareva!! That helped loads ^^
Image
New demo out 24/12/23!!

Post Reply

Who is online

Users browsing this forum: BBN_VN