Change position of main menu buttons
Posted: Sat Jul 18, 2020 7:19 am
I managed to change the main menu buttons from vertical to horizontal positioning. Can someone explain me how to change the line of the text so that it appears as a new line of buttons, and change the alignment, so that it shows as centre-aligned? This is my first time trying to code.
Currently, the position of my main menu buttons is like this:

My question is, how do I change the position of my buttons so that they look like this?

So far, this is what my code looks like:
Currently, the position of my main menu buttons is like this:

My question is, how do I change the position of my buttons so that they look like this?

So far, this is what my code looks like:
Code: Select all
screen navigation():
hbox:
style_prefix "navigation"
xpos 250
yanchor 0.5
ypos 570
spacing 10
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")
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")):
textbutton _("Help") action ShowMenu("help")
if renpy.variant("pc"):
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")