Page 1 of 1

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

Posted: Fri Dec 10, 2004 7:45 pm
by Tage
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?

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

Posted: Fri Dec 10, 2004 8:41 pm
by PyTom
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.

Posted: Fri Dec 10, 2004 11:36 pm
by Tage
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: )

Posted: Fri Dec 10, 2004 11:42 pm
by PyTom
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.

Posted: Sat Dec 11, 2004 12:07 am
by Tage
Awesome, it all works perfectly now. :D Thank you!

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