When I click on any of the extra menus it shows up fine but when I click on return they overlay
screen game_menu(title, scroll=None, yinitial=0.0):
style_prefix "game_menu"
if main_menu:
add gui.main_menu_background
else:
add gui.game_menu_background
frame:
style "game_menu_outer_frame"
hbox:
## Reserve space for the navigation section.
frame:
style "game_menu_navigation_frame"
frame:
style "game_menu_content_frame"
if scroll == "viewport":
viewport:
yinitial yinitial
scrollbars "vertical"
mousewheel True
draggable True
pagekeys True
side_yfill True
vbox:
transclude
elif scroll == "vpgrid":
vpgrid:
cols 1
yinitial yinitial
scrollbars "vertical"
mousewheel True
draggable True
pagekeys True
side_yfill True
transclude
else:
transclude
use navigation
textbutton _("Return"):
style "return_button"
action Return()
label title
if main_menu:
key "game_menu" action ShowMenu("main_menu")
screen extras_menu(title, scroll=None, yinitial=0.0):
style_prefix "game_menu"
if main_menu:
add gui.main_menu_background
else:
add gui.game_menu_background
frame:
style "game_menu_outer_frame"
hbox:
## Reserve space for the navigation section.
frame:
style "game_menu_navigation_frame"
frame:
style "game_menu_content_frame"
if scroll == "viewport":
viewport:
yinitial yinitial
scrollbars "vertical"
mousewheel True
draggable True
pagekeys True
side_yfill True
vbox:
transclude
elif scroll == "vpgrid":
vpgrid:
cols 1
yinitial yinitial
scrollbars "vertical"
mousewheel True
draggable True
pagekeys True
side_yfill True
transclude
else:
transclude
label title
use extras_navigation
Unfortunately due to the lack of indents in the code you posted, we can't determine the issue. Can you post it again using the proper code block in the post formatting or send us your project files to tofurocks.games@gmail.com? If all else fails, you may want to transfer your game code to a fresh copy of the template.