Modal True, YesNo, and MainMenu [FIXED]

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
DesertFox
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:

Modal True, YesNo, and MainMenu [FIXED]

#1 Post by DesertFox »

I'm using modal True for a Yes/No screen, but for some reason when one exits from the Main Menu, the YesNo prompt appears atop a transparent background rather than on top of the Main Menu. Is there any reason modal wouldn't work in this instance?
Last edited by DesertFox on Wed Oct 07, 2015 4:25 pm, edited 1 time in total.

User avatar
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Re: Modal True, YesNo, and MainMenu

#2 Post by Jae »

Can you show your code for your Yes/No section in screens.rpy?

I use modal as well for mine and they all appear just fine for me.

Code: Select all

init python:
    config.quit_action = Quit()

screen yesno_prompt:
    
    modal True

    if message == layout.QUIT:
        imagemap:
            ground 'GUI/Quit_Idle.png'
            hover 'GUI/Quit_Hover.png'
       
            hotspot (834, 510, 130, 76) action yes_action
            hotspot (978, 510, 130, 76) action no_action
            
    if message == layout.OVERWRITE_SAVE:
        imagemap:
            ground 'GUI/Overwrite_Idle.png'
            hover 'GUI/Overwrite_Hover.png'
       
            hotspot (834, 510, 130, 76) action yes_action
            hotspot (978, 510, 130, 76) action no_action
    
    if message == layout.DELETE_SAVE:
        imagemap:
            ground 'GUI/Delete_Save_Idle.png'
            hover 'GUI/Delete_Save_Hover.png'
       
            hotspot (834, 510, 130, 76) action yes_action
            hotspot (978, 510, 130, 76) action no_action
        
    if message == layout.LOADING:
        imagemap:
            ground 'GUI/Load_Idle.png'
            hover 'GUI/Load_Hover.png'
       
            hotspot (834, 510, 130, 76) action yes_action
            hotspot (978, 510, 130, 76) action no_action
        
    if message == layout.MAIN_MENU:
        imagemap:
            ground 'GUI/Return_Menu_Idle.png'
            hover 'GUI/Return_Menu_Hover.png'
       
            hotspot (834, 510, 130, 76) action yes_action
            hotspot (978, 510, 130, 76) action no_action

DesertFox
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: Modal True, YesNo, and MainMenu

#3 Post by DesertFox »

It's an issue that occurs when you click the 'X' on the window, to exit the game. Modal doesn't affect it for some reason, meaning it takes you to a new screen.

User avatar
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Re: Modal True, YesNo, and MainMenu

#4 Post by Jae »

Mine works just fine when I X out the window.

Is your Yes/No screen the same resolution as your game's? Mine takes up the entire screen with a semi-transparent filter.

DesertFox
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: Modal True, YesNo, and MainMenu

#5 Post by DesertFox »

I had this problem before and apparently fixed it once before, I just couldn't work out how.

Having this helps:

Code: Select all

config.quit_action = Quit()

Post Reply

Who is online

Users browsing this forum: No registered users