Screen Sticking to Main Menu

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
ShadowBoxGames
Newbie
Posts: 18
Joined: Fri Oct 07, 2016 9:58 pm
Tumblr: dozenroses.tumblr.com
Contact:

Screen Sticking to Main Menu

#1 Post by ShadowBoxGames »

So, I'm trying to create a slightly complex menu system where, when the game is completed you have access to an 'Extras' screen. The Extras screen has a navigation separate from the standard navigation I have for regular gameplay. In the Extras screen is a CG gallery that I want to flip between charcters as you click their names. To make this work I've created an Extras screen with its own navigation set up via imagemaps.
This is what it looks like. The gallery section is its own screen, and the left side options are the Extras screen:
Screen Shot 2018-07-17 at 1.09.49 AM.png
The problem I'm facing is that when I call other screens (for the characters individual galleries) on top of the Extras screen and then try to go back to the main menu, the additional screens stick, so I'm left with this weird screen overlapping the main menu.
Like so (that's the main menu behind it):
Screen Shot 2018-07-17 at 1.09.05 AM.png
Is there a way to fix this that isn't too complex code wise?
Here is my code at the moment for the Extras screen:

Code: Select all

## EXTRAS Screens ################################################################
##
##
##

screen music():
    pass

screen creator_notes():
    pass
    
screen character_bios():
    pass
    
screen extras_screen():
    tag menu
    imagemap: 
        ground "menu/extras_bg.png"
        idle "menu/extras_options_idle.png"
        hover "menu/extras_options_hover.png"
        selected_idle "menu/extras_options_hover.png"
        
        hotspot (100,203,131,65) action Show("nathan_gallery") hover_sound "Sounds/triangle.mp3" activate_sound "Sounds/da_ding.mp3"
        hotspot (99,281,116,58) action Show("music") hover_sound "Sounds/triangle.mp3" activate_sound "Sounds/da_ding.mp3"
        hotspot (99,353,160,79) action Show("character_bios") hover_sound "Sounds/triangle.mp3" activate_sound "Sounds/da_ding.mp3"
        hotspot (99,458,138,73) action Show("creator_notes") hover_sound "Sounds/triangle.mp3" activate_sound "Sounds/da_ding.mp3"
        hotspot (36,650,292,45) action Return() hover_sound "Sounds/triangle.mp3" activate_sound "Sounds/StylishPiano.mp3"

and here is the code for 1 of the 6 gallery screens I intend to have:

Code: Select all

screen nathan_gallery():
    add "menu/nathan_gallery.png"
    
    ##Thumbnails buttons: here we put the small versions of our CGs we've previously saved in the game folder. 
    if persistent.CG1_unlocked:
        imagebutton auto "CG3_%s.png" xpos 216 ypos 180 focus_mask True action ShowMenu('cg3')
    
    if persistent.CG2_unlocked:
        imagebutton auto "CG3_%s.png" xpos 216 ypos 180 focus_mask True action ShowMenu('cg3')
    
    if persistent.CG3_unlocked:
        imagebutton auto "CG3_%s.png" xpos 216 ypos 180 focus_mask True action ShowMenu('cg3')
   
    if persistent.CG4_unlocked:
        imagebutton auto "CG3_%s.png" xpos 216 ypos 180 focus_mask True action ShowMenu('cg3')
        
    if persistent.CG5_unlocked:
        imagebutton auto "CG4_%s.png" xpos 615 ypos 250 focus_mask True action ShowMenu('cg4')
        
    if persistent.CG6_unlocked:
        imagebutton auto "CG3_%s.png" xpos 216 ypos 180 focus_mask True action ShowMenu('cg3')
        
    if persistent.CG7_unlocked:
        imagebutton auto "CG3_%s.png" xpos 216 ypos 180 focus_mask True action ShowMenu('cg3')

 ##this section needs finished, come back later###
screen cg1_1:
    tag menu
    imagemap:
       ground 'CG1_1.png'      #CG1_1 is the first version of CG1
       
       hotspot (0, 0, 1500, 720) action ShowMenu("cg1_2")
       
screen cg1_2:
    tag menu
    imagemap:
       ground 'CG1_2.png'     #CG1_2 is the second version of CG1
       
       hotspot (0, 0, 1500, 720) action ShowMenu("cg1_n")
       
screen cg1_n:
    tag menu
    imagemap:
       ground 'CG1_n.png'      #CG1_n is the nst version of CG1
       
       hotspot (0, 0, 1500, 720) action ShowMenu("extra_events")

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Screen Sticking to Main Menu

#2 Post by gas »

Remove tag menu from cg screens and show them as normal screens.
When you close the extra menu, the other tagged screens stay in the context.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

Post Reply

Who is online

Users browsing this forum: babayi0827, Bing [Bot], Semrush [Bot]