I have a problem that I've been able to find the source of but am not sure of a way past it. My visual novel has different main menu screens depending on the ending you get, and they all pretty much read out like the one below:
Code: Select all
screen main_menu_0():
## This ensures that any other menu screen is replaced.
tag menu
imagemap:
ground "main_menu.png"
style_prefix "main_menu"
add gui.main_menu_background
## This empty frame darkens the main menu.
frame:
background "gui/overlay/main_menu.png"
## The use statement includes another screen inside this one. The actual
## contents of the main menu are in the navigation screen.
textbutton _("{size=45}START GAME{/size}") action Start() yalign 0.45 xalign 0.05 text_outlines [ (2, "#202020", absolute (1), 1) ] activate_sound "bellclick.mp3" hover_sound "bellhover.mp3"
textbutton _("{size=45}LOAD GAME{/size}") action ShowMenu("load") yalign 0.55 xalign 0.05 text_outlines [ (2, "#202020", absolute (1), 1) ] activate_sound "bellclick.mp3" hover_sound "bellhover.mp3"
textbutton _("{size=45}SETTINGS{/size}") action ShowMenu("preferences") yalign 0.65 xalign 0.05 text_outlines [ (2, "#202020", absolute (1), 1) ] activate_sound "bellclick.mp3" hover_sound "bellhover.mp3"
textbutton _("{size=45}QUIT GAME{/size}") action Quit(confirm=not main_menu) yalign 0.75 xalign 0.05 text_outlines [ (2, "#202020", absolute (1), 1) ] activate_sound "bellclick.mp3" hover_sound "bellhover.mp3"
if gui.show_name:
vbox:
text "[config.name!t]":
style "main_menu_title"
text "[config.version]":
style "main_menu_version"
transform logoin:
style main_menu_frame is empty
style main_menu_vbox is vbox
style main_menu_text is gui_text
style main_menu_title is main_menu_text
style main_menu_version is main_menu_text
style main_menu_frame:
xsize 420
yfill True
background "gui/overlay/main_menu.png"
style main_menu_vbox:
xalign 1.0
xoffset -30
xmaximum 1200
yalign 1.0
yoffset -30
style main_menu_text:
properties gui.text_properties("main_menu", accent=True)
style main_menu_title:
properties gui.text_properties("title")
style main_menu_version:
properties gui.text_properties("version")It will respond while playing the game, so I trial-and-errored the code editing, coming to the conclusion that the "screen" menu that calls the variations of the main menu screen is most likely the problem; however, I am not sure of a better alternative to call in the main menu screens and make the return button respond while in said main menu.
Code: Select all
## Main Menu screen ############################################################
##
## Used to display the main menu when Ren'Py starts.
##
## https://www.renpy.org/doc/html/screen_special.html#main-menu
style buttonz:
color "#f7f7f7"
hover_color "#357EC7"
screen main_menu:
if persistent.Tau_GoodEnd == True and persistent.Ru_GoodEnd == False and persistent.Jen_GoodEnd == False and persistent.true_end_game == False:
use main_menu_1t
elif persistent.Tau_GoodEnd == False and persistent.Ru_GoodEnd == False and persistent.Jen_GoodEnd == True and persistent.true_end_game == False:
use main_menu_1j
elif persistent.Tau_GoodEnd == False and persistent.Ru_GoodEnd == True and persistent.Jen_GoodEnd == False and persistent.true_end_game == False:
use main_menu_1r
elif persistent.Tau_GoodEnd == True and persistent.Ru_GoodEnd == True and persistent.Jen_GoodEnd == False and persistent.true_end_game == False:
use main_menu_2tr
elif persistent.Tau_GoodEnd == True and persistent.Ru_GoodEnd == False and persistent.Jen_GoodEnd == True and persistent.true_end_game == False:
use main_menu_2tj
elif persistent.Tau_GoodEnd == False and persistent.Ru_GoodEnd == True and persistent.Jen_GoodEnd == True and persistent.true_end_game == False:
use main_menu_2rj
elif persistent.Tau_GoodEnd == True and persistent.Ru_GoodEnd == True and persistent.Jen_GoodEnd == True and persistent.true_end_game == False:
use main_menu_3
elif persistent.Tau_GoodEnd == False and persistent.Ru_GoodEnd == True and persistent.Jen_GoodEnd == True and persistent.true_end_game == True:
use main_menu_4
else:
use main_menu_0
#Main Menu change after ending
screen main_menu_0():