Overlay Yes/No Prompt when leaving the game
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.
- Keinart
- Regular
- Posts: 133
- Joined: Sun May 13, 2012 8:28 pm
- Completed: One Thousand Lies
- Projects: Lotus Reverie
- Organization: Keinart Lobre
- Tumblr: keinart
- itch: keinart
- Location: Spain
- Contact:
Overlay Yes/No Prompt when leaving the game
I changed the Yes/No Prompt background to a transparent one so the screen gets darker when the message appears. It works fine except when pressing the X in windows mode to exit just as you can see in the picture. Is there anyway to change this?
Basically I want to see how the screen gets darker instead of changing completly, no matter if I'm in the middle of the novel or in any menu.
Thanks in advance.
Basically I want to see how the screen gets darker instead of changing completly, no matter if I'm in the middle of the novel or in any menu.
Thanks in advance.
Re: Overlay Yes/No Prompt when leaving the game
You're lucky. In Ren'py 6.16, clicking the 'X' there just gives me an error message (regular quitting works fine though). At least you can click it without crashing your game. I suspect something changed in newer versions of Ren'py that made clicking the 'X' call the screen differently than activating "Quit()" because in the version I first got (6.13), it didn't have that error message problem. Clicking the 'X' functioned 100% the same as Quitting in any other fashion. It also did the darker message thing that you wanted perfectly fine for me.
I often find that when the background changes like that, it's an issue with the fact that it's a menu. When Ren'py calls a menu, it calls it as a brand new screen, erasing any other open menus (including the main menu). If you try for a transparent BG, you'll end up getting that checkerboard behind it because there is no background under your new menu. Sometimes even with simple prompts, it can get confused and resort to this behavior. Without re-doing the way the screens function significantly, you pretty much can't see anything behind a menu unless the only thing under it was the game itself. If you go from a menu to another menu, you lose that game behind it effect.
I often find that when the background changes like that, it's an issue with the fact that it's a menu. When Ren'py calls a menu, it calls it as a brand new screen, erasing any other open menus (including the main menu). If you try for a transparent BG, you'll end up getting that checkerboard behind it because there is no background under your new menu. Sometimes even with simple prompts, it can get confused and resort to this behavior. Without re-doing the way the screens function significantly, you pretty much can't see anything behind a menu unless the only thing under it was the game itself. If you go from a menu to another menu, you lose that game behind it effect.
-
- Regular
- Posts: 196
- Joined: Sun Jul 28, 2013 1:29 pm
- Completed: Over The Hills And Far Away
- Projects: My Little Dictator
- Organization: WarGirl Games
- Contact:
Re: Overlay Yes/No Prompt when leaving the game
If you go to screens.rpy and to your Yes/No prompt section you'll see:
The line 'tag menu' means that this screen will replace other screens instead of just overlay them. So just comment with a # or remove it.
Code: Select all
screen yesno_prompt:
tag menu
modal True
Code: Select all
screen yesno_prompt:
#tag menu
modal True
- Keinart
- Regular
- Posts: 133
- Joined: Sun May 13, 2012 8:28 pm
- Completed: One Thousand Lies
- Projects: Lotus Reverie
- Organization: Keinart Lobre
- Tumblr: keinart
- itch: keinart
- Location: Spain
- Contact:
Re: Overlay Yes/No Prompt when leaving the game
Thanks for replying.DesertFox wrote:If you go to screens.rpy and to your Yes/No prompt section you'll see:
The line 'tag menu' means that this screen will replace other screens instead of just overlay them. So just comment with a # or remove it.Code: Select all
screen yesno_prompt: tag menu modal True
Code: Select all
screen yesno_prompt: #tag menu modal True
I tried this but it doesn't seem to work, and I haven't made any changes on the code for the Yes/No Prompt so I don't really think I messed anywhere In fact, in any other menu or part of the game, it seems to work fine, it only changes the background completly when I press the X to exit. Pics related:
So, maybe it's something related with the new version? I just updated to it so maybe is relatedCrazy Li wrote:You're lucky. In Ren'py 6.16, clicking the 'X' there just gives me an error message (regular quitting works fine though). At least you can click it without crashing your game. I suspect something changed in newer versions of Ren'py that made clicking the 'X' call the screen differently than activating "Quit()" because in the version I first got (6.13), it didn't have that error message problem. Clicking the 'X' functioned 100% the same as Quitting in any other fashion. It also did the darker message thing that you wanted perfectly fine for me.
I often find that when the background changes like that, it's an issue with the fact that it's a menu. When Ren'py calls a menu, it calls it as a brand new screen, erasing any other open menus (including the main menu). If you try for a transparent BG, you'll end up getting that checkerboard behind it because there is no background under your new menu. Sometimes even with simple prompts, it can get confused and resort to this behavior. Without re-doing the way the screens function significantly, you pretty much can't see anything behind a menu unless the only thing under it was the game itself. If you go from a menu to another menu, you lose that game behind it effect.
Re: Overlay Yes/No Prompt when leaving the game
So only yes/no when you click the X? If you click your "Salir" button, that yes/no prompt works right? If that's the case, I really do suspect the version is the culprit.
- Keinart
- Regular
- Posts: 133
- Joined: Sun May 13, 2012 8:28 pm
- Completed: One Thousand Lies
- Projects: Lotus Reverie
- Organization: Keinart Lobre
- Tumblr: keinart
- itch: keinart
- Location: Spain
- Contact:
Re: Overlay Yes/No Prompt when leaving the game
Exactly, if I press "Salir" it works fine. It doesn't really make any senseCrazy Li wrote:So only yes/no when you click the X? If you click your "Salir" button, that yes/no prompt works right? If that's the case, I really do suspect the version is the culprit.
Re: Overlay Yes/No Prompt when leaving the game
Yep, that's my problem. Except worse because it won't even show the yes/no prompt, instead just giving me an error message. Something about overlays or something. I just stick to my older version because it works without errors.
- Pierrou
- Regular
- Posts: 53
- Joined: Fri Dec 05, 2014 8:25 pm
- Projects: Togainu no Chi, DMMD, Omerta, ...
- Skype: pierrouney
- Location: France
- Contact:
Re: Overlay Yes/No Prompt when leaving the game
I have the same problem... It works fine everywhere but not when i click on the "Red X" :/
Exactly the same bug...
Does anyone know why ?
I'm on Mac OS X Yosemite // Ren'Py 6.18.3
Exactly the same bug...
Does anyone know why ?
I'm on Mac OS X Yosemite // Ren'Py 6.18.3
Sorry for my english, it's not my native language. :s
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: Overlay Yes/No Prompt when leaving the game
Have you tried this solution?
http://lemmasoft.renai.us/forums/viewto ... 21#p343438
Though this is normally used with an Imagemap it can be adapted by adding just this to the Top:
However, this adds a background to ALL the Quit screens, (and only the Quit screens.)
http://lemmasoft.renai.us/forums/viewto ... 21#p343438
Though this is normally used with an Imagemap it can be adapted by adding just this to the Top:
Code: Select all
# Yes/No Prompt
screen yesno_prompt(message, yes_action, no_action):
modal True
# window:
# style "gm_root"
if message == layout.QUIT:
if main_menu:
add "background.jpg"
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Re: Overlay Yes/No Prompt when leaving the game
But what should I do if I want previous background to stay without changes? Yes/no prompt should appear in front of all layers, right?(modal True) Why this screen clears all layers behind it in case of "red x" click?
Re: Overlay Yes/No Prompt when leaving the game
It's like dejavu from 10 days ago...
- shivanshs9
- Regular
- Posts: 54
- Joined: Sun Jul 20, 2014 1:59 pm
- Projects: The Destiny(http://thedestiny-cxz.blogspot.com)
- Organization: Cyber-X-Zone
- Location: India
- Contact:
Re: Overlay Yes/No Prompt when leaving the game
Just like what xela suggested...
In the Ren'Py documentation:config.quit_action
First, use the bit of code as DesertFox suggested and then add this in options.rpy under init python...
And, it's done!
In the Ren'Py documentation:config.quit_action
First, use the bit of code as DesertFox suggested and then add this in options.rpy under init python...
Code: Select all
init python:
config.quit_action = Quit()
"Destiny is a no matter of chance
It is a matter of choice
It is not a thing to be waited for
It is a thing to be achieved..."
-William Jennings Bryan
It is a matter of choice
It is not a thing to be waited for
It is a thing to be achieved..."
-William Jennings Bryan
If you can dream and not make dreams your master;
If you can think and not make thoughts your aim,
If you can meet with Triumph and Disaster;
And treat those two impostors just the same,
Only then can you ever win against yourself...
If you can think and not make thoughts your aim,
If you can meet with Triumph and Disaster;
And treat those two impostors just the same,
Only then can you ever win against yourself...
Re: Overlay Yes/No Prompt when leaving the game
Thank you very much!
- Pierrou
- Regular
- Posts: 53
- Joined: Fri Dec 05, 2014 8:25 pm
- Projects: Togainu no Chi, DMMD, Omerta, ...
- Skype: pierrouney
- Location: France
- Contact:
Re: Overlay Yes/No Prompt when leaving the game
xela wrote:It's like dejavu from 10 days ago...
Haaaa that Xela I love you <3
Sorry for my english, it's not my native language. :s
Who is online
Users browsing this forum: Princesky