SnootGame/game/src/mod_menu.rpy

77 lines
2.2 KiB
Plaintext

# Mod Menu screen ############################################################
##
## Handles jumping to the mods scripts
## Could be more lean but if this is going to one of last time I touch the UI,
## then fine by me
##
#similar to quick_button funcs
screen mod_menu_button(filename, label, function):
button:
xmaximum 600
ymaximum 129
action function
<<<<<<< HEAD
if 'Back' in label or 'Return' in label or 'Quit' in label or 'Main Menu' in label:
activate_sound "audio/ui/uiBack.wav"
else:
activate_sound "audio/ui/uiClick.wav"
=======
>>>>>>> origin/Monster-Update-6
fixed:
add filename xalign 0.5 yalign 0.5 zoom 0.9
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 34
# arr is [{
# 'Name': string (name that appears on the button)
# 'Label': string (jump label)
# }, { .. } ]
# Reuse the same image string and keep things 'neat'.
screen mod_menu_buttons(filename, arr):
for x in arr:
use mod_menu_button(filename, x['Name'], Start(x['Label']))
screen mod_menu():
tag menu
style_prefix "main_menu"
add gui.main_menu_background
frame:
xsize 420
yfill True
background "gui/overlay/main_menu.png"
#side_yfill True
vbox:
xpos 1940
yalign 0.03
if persistent.splashtype == 1:
add "gui/sneedgame.png"
else:
add "gui/snootgame.png"
viewport:
# this could be better but its ok for now
xpos 1885-540
xmaximum 540
ymaximum 0.8
ypos 200
yinitial 0
scrollbars "vertical"
mousewheel True
draggable True
pagekeys True
vbox:
#xpos 1885
spacing 18
#yalign 0.98
#buttons are messed up but that's ok
use mod_menu_button("gui/button/menubuttons/template_idle.png", "Return", ShowMenu("main_menu"))
if len(mod_menu_access) is not 0:
use mod_menu_buttons("gui/button/menubuttons/template_idle.png", mod_menu_access )
else:
use mod_menu_button("gui/button/menubuttons/template_idle.png", "You have no mods", None)