Can I have "Quit Game", on the Main Menu, prompt?

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
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

Can I have "Quit Game", on the Main Menu, prompt?

#1 Post by Tage » Fri Dec 10, 2004 7:45 pm

As of now, the "Quit Game" just exits the game without prompting "Yes" or "No" for quitting. I want to know if I can make it prompt like it does from inside the "Continue Game" screen.

Right now, I have "Quit Game" point to my own label that uses an imagemap to prompt the exit.

Also, when I say "No" on the "Continue Game" screen exit prompt, it takes me back to the game instead of the "Continue Game" screen. Is there any way to "correct" this?

User avatar
PyTom
Ren'Py Creator
Posts: 15469
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Can I have "Quit Game", on the Main Menu, prom

#2 Post by PyTom » Fri Dec 10, 2004 8:41 pm

Tage wrote:As of now, the "Quit Game" just exits the game without prompting "Yes" or "No" for quitting. I want to know if I can make it prompt like it does from inside the "Continue Game" screen.
If you change library.main_menu to point to _confirm_quit rather than _quit, it should work.
Also, when I say "No" on the "Continue Game" screen exit prompt, it takes me back to the game instead of the "Continue Game" screen. Is there any way to "correct" this?
Not really. The problem is, Ren'Py doesn't keep a memory of how you got to quit. If you think of "Load", "Save", "Preferences" and "Quit" as tabs in a more normal application, you can sort of get how this works.

User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#3 Post by Tage » Fri Dec 10, 2004 11:36 pm

Once again, it sounded so obvious, lol. :? It does pull up a prompt as said; however, both "Yes" and "No" close the program. :cry: I guess I'll stick with my imagemap. (took me a while to make anyway, rofl :lol: )

User avatar
PyTom
Ren'Py Creator
Posts: 15469
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#4 Post by PyTom » Fri Dec 10, 2004 11:42 pm

And, in retrospect, I can see why both close the program. You really need to make it something like:

Code: Select all

label confirm_quit:
    call _confirm_quit
    jump main_menu
Otherwise, even if you don't confirm the quit, you fall of the edge of the world, and Ren'Py automatically closes in that case.

--
Finishing up the documentation for 4.3.

User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#5 Post by Tage » Sat Dec 11, 2004 12:07 am

Awesome, it all works perfectly now. :D Thank you!

goodbye silly imagemap prompt... :cry: :arrow: :twisted:

Post Reply

Who is online

Users browsing this forum: Google [Bot]