I wanted to add a chapter select screen to the main menu but after I did, when I try to access the new screen or options. load, about etc from the main menu, the placement of the navigation is off compared to how it used to be. But only from the main menu, when I start a new game or select the chapter and access the navigation from there it looks like how it should. What went wrong here?
Here's how it should look like, as accessed from in-game:
https://imgur.com/8klTjsE
And here is what it looks like from the main menu
https://imgur.com/IPRj0IT
Shortening the chapter select option in the menu made the problem a lot less noticable but it's still there.
The navigation code:
Code: Select all
screen navigation():
vbox:
style_prefix "navigation"
if renpy.get_screen("main_menu"):
xalign 0.5
yalign 0.6
else:
xpos gui.navigation_xpos
yalign 0.5
spacing gui.navigation_spacing
if main_menu:
textbutton _("Start") action Start()
textbutton _("Chapters") action ShowMenu("chapters")
else:
textbutton _("History") action ShowMenu("history")
textbutton _("Save") action ShowMenu("save")
textbutton _("Load") action ShowMenu("load")
textbutton _("Options") action ShowMenu("preferences")
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"):
## Help isn't necessary or relevant to mobile devices.
textbutton _("Help") action ShowMenu("help")
## The quit button is banned on iOS and unnecessary on Android.
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")
xalign 0.5