I was testing the UI engine for my visual novel I'm attempting to make and they ended up getting overlayed?
I don't know how to fix this
A sample project with all those bells and whistles · By
screen navigation():
vbox:
style_prefix "navigation"
xpos gui.navigation_xpos
yalign 0.5
spacing gui.navigation_spacing
if main_menu:
textbutton _("Start") action Start()
else:
textbutton _("History") action ShowMenu("history")
textbutton _("Save") action ShowMenu("save")
textbutton _("Load") action ShowMenu("load")
textbutton _("Preferences") action ShowMenu("preferences")
textbutton _("Extras") action ShowMenu("extras_navigation")
if _in_replay:
textbutton _("End Replay") action EndReplay(confirm=True)
elif not main_menu:
textbutton _("Main Menu") action MainMenu()
textbutton _("About") action ShowMenu("about")
if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
## Help isn't necessary or relevant to mobile devices.
textbutton _("Help") action ShowMenu("help")
if renpy.variant("pc"):
## The quit button is banned on iOS and unnecessary on Android and
## Web.
textbutton _("Quit") action Quit(confirm=not main_menu)
style navigation_button is gui_button
style navigation_button_text is gui_button_text
style navigation_button:
size_group "navigation"
properties gui.button_properties("navigation_button")
style navigation_button_text:
properties gui.button_text_properties("navigation_button")
screen extras_navigation():
vbox:
style_prefix "navigation"
xpos gui.navigation_xpos
yalign 0.5
spacing gui.navigation_spacing
textbutton _("Achievements") action ShowMenu("achievements") alt "Achievements"
textbutton _("Sprite Gallery") action ShowMenu("sprite_gallery") alt "Sprite Gallery"
textbutton _("Background Gallery") action ShowMenu("bg_gallery") alt "Background Gallery"
textbutton _("Music Room") action ShowMenu("music_gallery") alt "Music Room"
textbutton _("Replay Room") action ShowMenu("replay_gallery") alt "Replay Room"
if persistent.game_clear:
textbutton _("Developer Notes") action ShowMenu("dev_notes") alt "Developer Notes"
else:
textbutton _("???") action None alt "Locked Option"
textbutton _("Return") action Return() alt "Return"
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
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.