I did get that sorted out, but I'm having trouble with the Preference menu. It's still tiny, as seen here.
How do I make it bigger (and still keep it in the corner)?
Here's my code for the main menu and navigation menu:
Code: Select all
##############################################################################
# Main Menu
#
# Screen that's used to display the main menu, when Ren'Py first starts
# http://www.renpy.org/doc/html/screen_special.html#main-menu
screen main_menu:
# This ensures that any other menu screen is replaced.
tag menu
# The background of the main menu.
window:
style "mm_root"
# The main menu buttons.
frame:
style_group "mm"
xalign .98
yalign .98
has vbox
textbutton _("New Game") action Start()
textbutton _("Load Game") action ShowMenu("load")
textbutton _("Preferences") action ShowMenu("preferences")
textbutton _("Help") action Help()
textbutton _("Quit") action Quit(confirm=False)
init -2 python:
# Make all the main menu buttons be the same size.
style.mm_button.size_group = "mm"
style.mm_button_text.size = 60
##############################################################################
# Navigation
#
# Screen that's included in other screens to display the game menu
# navigation and background.
# http://www.renpy.org/doc/html/screen_special.html#navigation
screen navigation:
# The background of the game menu.
window:
style "gm_root"
# The various buttons.
frame:
style_group "gm_nav"
xalign .98
yalign .98
has vbox
textbutton _("Return") action Return()
textbutton _("Preferences") action ShowMenu("preferences")
textbutton _("Save Game") action ShowMenu("save")
textbutton _("Load Game") action ShowMenu("load")
textbutton _("Main Menu") action MainMenu()
textbutton _("Help") action Help()
textbutton _("Quit") action Quit()
init -2 python:
# Make all the main menu buttons be the same size.
style.gm_root_text.size = 60
style.gm_root.size_group = "gm_root"
style.gm_nav_button.size_group = "gm_nav"
style.gm_nav_button_text.size = 60
I have a pre-made menu from here.
Here it is next to the default quick menu (text is black, so it's hard to see):
How do I replace the default menu with the new menu, but also have the new menu going horizontally instead of vertically like it is?
Code: Select all
##############################################################################
# Quick Menu
#
# A screen that's included by the default say screen, and adds quick access to
# several useful functions.
screen quick_menu:
# Add an in-game quick menu.
hbox:
style_group "quick"
xalign 1.0
yalign 1.0
textbutton _("Q.Save") action QuickSave()
textbutton _("Q.Load") action QuickLoad()
textbutton _("Save") action ShowMenu('save')
textbutton _("Skip") action Skip()
textbutton _("Auto") action Preference("auto-forward", "toggle")
textbutton _("Prefs") action ShowMenu('preferences')
init -2 python:
style.quick_button.set_parent('default')
style.quick_button.background = None
style.quick_button.xpadding = 5
style.quick_button_text.set_parent('default')
style.quick_button_text.size = 35
style.quick_button_text.idle_color = "#000000"
style.quick_button_text.hover_color = "#ccc"
style.quick_button_text.selected_idle_color = "#cc08"
style.quick_button_text.selected_hover_color = "#cc0"
style.quick_button_text.insensitive_color = "#4448"
# Make all the main menu buttons be the same size.
style.quick_button.size_group = "mm"
style.quick_button_text.size = 35
# Set a default value for the auto-forward time, and note that AFM is
# turned off by default.
config.default_afm_time = 10
config.default_afm_enable = False
init python:
def toggle_skipping():
config.skipping = not config.skipping
show_button_game_menu = True
def button_game_menu():
if show_button_game_menu:
# to save typing
ccinc = renpy.curried_call_in_new_context
ui.vbox(xpos=0.99, ypos=0.99, xanchor='right', yanchor='bottom')
ui.textbutton("Skip", clicked=toggle_skipping, xminimum=100)
ui.textbutton("Save", clicked=ccinc("_game_menu_save"), xminimum=100)
ui.textbutton("Load", clicked=ccinc("_game_menu_load"), xminimum=100)
ui.textbutton("Prefs", clicked=ccinc("_game_menu_preferences"), xminimum=100)
ui.close()
config.window_overlay_functions.append(button_game_menu)