Jam13Yuuka/game/screens/main_menu.rpy

73 lines
2.0 KiB
Plaintext
Raw Normal View History

2024-04-05 05:40:52 +00:00
## Main Menu screen ############################################################
##
## Used to display the main menu when Ren'Py starts.
##
## https://www.renpy.org/doc/html/screen_special.html#main-menu
## Replace this with your background image, if you like
image main_menu_background = "Main_Menu3.png"
2024-04-19 04:21:17 +00:00
image main_menu_foreground_pc = HBox(
Solid("#292835AA", xsize=325, ysize=580)
)
image main_menu_foreground_web = HBox(
Solid("#292835AA", xsize=325, ysize=500)
2024-04-14 20:30:11 +00:00
) # TODO: use platform checking to make this smaller on web and bigger on other platforms as for some reason this is larger on web
2024-04-05 05:40:52 +00:00
screen main_menu():
## This ensures that any other menu screen is replaced.
tag menu
add "main_menu_background":
ypos -20
xpos -70
2024-04-19 04:21:17 +00:00
if renpy.emscripten:
add "main_menu_foreground_web":
xalign 0.5
yalign 0.95
else:
add "main_menu_foreground_pc":
xalign 0.5
yalign 0.95
2024-04-05 05:40:52 +00:00
vbox:
xalign 0.5
yalign 0.95
2024-04-19 04:21:17 +00:00
spacing -8
2024-04-05 05:40:52 +00:00
textbutton _("Start") action Start():
xalign 0.5
2024-04-05 05:40:52 +00:00
2024-04-19 04:21:17 +00:00
textbutton _("Codex") action ShowMenu('category_welcome'):
xalign 0.5
textbutton _("Load") action ShowMenu("load"):
xalign 0.5
2024-04-05 05:40:52 +00:00
textbutton _("Endings") action ShowMenu("ending_gallery"):
xalign 0.5
textbutton _("Preferences") action ShowMenu("preferences"):
xalign 0.5
2024-04-05 05:40:52 +00:00
textbutton _("About") action ShowMenu("about"):
xalign 0.5
2024-04-05 05:40:52 +00:00
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"):
xalign 0.5
2024-04-05 05:40:52 +00:00
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):
xalign 0.5
2024-04-05 05:40:52 +00:00