The return function from my Preferences menu works on everything except for the Main Menu screen.
If I start the game, go to Preferences and then click Return I am not brought back to the main menu, I am stuck in the preferences screen.
This is my code for the escape menu/click pull up menu.
Code: Select all
screen navigation:
# The background of the game menu.
window:
style "gm_root"
screen esc_menu:
modal True
frame xalign 0.5 yalign 0.2 background None:
imagemap:
ground "bg/menu_popup.png"
idle "bg/menu_popup2.png"
hotspot (744, 39, 392, 137) action Return()
hotspot (749, 195, 387, 152) action ShowMenu("save")
hotspot (747, 357, 387, 161) action ShowMenu("load")
hotspot (749, 542, 384, 174) action ShowMenu("preferences")
hotspot (684, 738, 548, 152) action MainMenu()
hotspot (800, 909, 303, 137) action Quit(confirm=False) #Use action "action Quit(confirm=False)" if you don't want them to confirm to quit. Else use "action ShowMenu("quit")"
key "game_menu" action Hide("esc_menu", dissolve)
frame:
has vbox
init python:
config.game_menu_action = [ FileTakeScreenshot(), ShowMenu("esc_menu", transition=dissolve) ]
screen one_button_scr:
imagebutton:
align (0.5, 0.98)
idle "bg/menu_corner.png"
hover Animation ("bg/menu_corner2.png", .5, "bg/menu_corner3.png", .5)
action ShowMenu("esc_menu", transition=dissolve) activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
init -2:
# Make all game menu navigation buttons the same size.
style gm_nav_button:
size_group "gm_nav"
Code: Select all
screen preferences:
imagemap:
ground "bg/preferences_2.jpg"
idle "bg/preferences_3.png"
hover "bg/preferences_5.png"
selected_idle "bg/preferences_4.png"
selected_hover "bg/preferences_3.png"
alpha False
hotspot (113, 278, 199, 49) action Preference("display", "window") activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
hotspot (92, 333, 267, 50) action Preference("display", "fullscreen") activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
hotspot (51, 495, 360, 51) action Preference("skip", "seen") activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
hotspot (48, 542, 365, 61) action Preference("skip", "all") activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
hotspot (705, 275, 129, 54) action Preference("transitions", "all") activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
hotspot (708, 329, 126, 51) action Preference("transitions", "none") activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
hotspot (1310, 552, 331, 50) action Preference("after choices", "stop") activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
hotspot (1311, 495, 332, 57) action Preference("after choices", "skip") activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
hotspot (1515, 942, 365, 135) action Return() activate_sound "bg/ting2.ogg" hover_sound "bg/ting1.ogg"
bar pos (612, 488) value Preference("text speed") style "pref_slider"
bar pos (1311, 683) value Preference("sound volume") style "pref_slider"
bar pos (233, 678) value Preference("music volume") style "pref_slider"
bar pos (752, 879) value Preference("voice volume") style "pref_slider"
bar pos (1311, 281) value Preference("auto-forward time") style "pref_slider"
init -2 python:
style.pref_slider.left_bar = "bg/slider_1.jpg"
style.pref_slider.right_bar = "bg/slider_2.jpg"
style.pref_slider.xmaximum = 310
style.pref_slider.ymaximum = 74
style.pref_slider.thumb = "bg/slider_thumb.png"
style.pref_slider.thumb_offset = 4
style.pref_slider.thumb_shadow = None