SnootGameItalian/game/src/extra_chapters_menu.rpy

103 lines
3.2 KiB
Plaintext

init python:
ex_chapters = [
[ "Chicxulub Gutterlane", "chapter_x1" ],
[ "The Mous Pad", "chapter_x2" ],
[ "PTA Meeting", "chapter_x3" ],
[ "Passion of the Trigga I", "chapter_x4" ],
[ "Passion of the Trigga II", "chapter_x5" ],
[ "Passion of the Trigga III", "chapter_x6" ],
[ "Naomi's Tribulations I", "chapter_x7" ],
[ "Naomi's Tribulations II", "chapter_x8" ],
[ "Naomi's Tribulations III", "chapter_x9" ],
[ "RAYmba's Observations", "chapter_x10" ]
]
ex_chapters_menu = ex_chapters.copy()
if persistent.endings is None:
ending_image()
pass
#similar to quick_button funcs
screen ex_ch_button(filename, label, function):
button:
xmaximum 600
ymaximum 129
action function
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"
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
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
# Reuse the same image string and keep things 'neat'.
screen ex_ch_buttons(filename, label_functions):
for l_f in label_functions:
use ex_ch_button(filename, l_f[0], Start(l_f[1]) )
screen ex_ch_menu():
python:
global ex_chapters_menu
ex_chapters_menu = ex_chapters.copy()
e = persistent.endings #ending seen
if (e ^ 0b0000 == 0):
ex_chapters_menu.clear()
elif not (e & 0b1111 == 0b1111):
w = 4
for i in range(0, 4):
w -= persistent.endings >> i & 0b1 == 0b1
#trish
for i in range(5, 5-w, -1):
ex_chapters_menu.remove(ex_chapters[i])
#naomi
for i in range(8, 8-w, -1):
ex_chapters_menu.remove(ex_chapters[i])
ex_chapters_menu.pop()
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 12
#yalign 0.98
use ex_ch_button("gui/button/menubuttons/template_idle.png", "Return", ShowMenu("main_menu"))
#use ex_ch_button("gui/button/menubuttons/template_idle.png", str(e), ShowMenu("main_menu"))
if len(ex_chapters_menu):
use ex_ch_buttons("gui/button/menubuttons/template_idle.png", ex_chapters_menu )
for x in range(0, len(ex_chapters) - len(ex_chapters_menu)):
use ex_ch_button("gui/button/menubuttons/template_idle.png", "???", None)