Bonus Chapters flash

This commit is contained in:
Nutbuster 2021-10-17 04:25:12 +11:00
parent 5dfe9d0628
commit bce3e15c7f
2 changed files with 26 additions and 2 deletions

View File

@ -434,6 +434,29 @@ screen main_menu_button(filename, label, function):
add filename xalign 0.5 yalign 0.5 zoom 1 xanchor 0 xcenter 0.5 ycenter 0.5
text label xalign 0.5 yalign 0.5 xanchor 0.5
image bonus_flash:
"gui/button/menubuttons/template_idle.png"
matrixcolor TintMatrix(Color((5*255, 5*255, 5*255)))
easeout_cubic 0.30 matrixcolor TintMatrix(Color((255, 255, 255)))
pause 0.133
repeat 4
screen bonus_chapter_button():
#("gui/button/menubuttons/template_idle.png", "Bonus Chapters", ShowMenu("ex_ch_menu"))
button:
xmaximum 500
ymaximum 129
action ShowMenu("ex_ch_menu")
activate_sound "audio/ui/uiClick.wav"
fixed:
if persistent.old_endings != persistent.endings:
add "bonus_flash" xalign 0.5 yalign 0.5 zoom 1 xanchor 0 xcenter 0.5 ycenter 0.5
$ persistent.old_endings = persistent.endings
else:
add "gui/button/menubuttons/template_idle.png" xalign 0.5 yalign 0.5 zoom 1 xanchor 0 xcenter 0.5 ycenter 0.5
text "Bonus Chapters" xalign 0.5 yalign 0.5 xanchor 0.5
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
# Reuse the same image string and keep things 'neat'.
screen main_menu_buttons(filename, label_functions):
@ -467,10 +490,10 @@ screen main_menu():
spacing 10
xpos 1885
ypos 1130
use main_menu_button("gui/button/menubuttons/template_idle.png", "Start", Start())
use bonus_chapter_button()
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
[
[ "Start", Start() ],
[ "Bonus Chapters", ShowMenu("ex_ch_menu") ],
[ "Load", ShowMenu("load") ],
[ "Options", ShowMenu("preferences") ],
[ "Extras", ShowMenu("extras") ], \

View File

@ -7,6 +7,7 @@ init -1 python:
fn = "e"+str(i)+"of4"
endings |= (_e * renpy.seen_image(fn))
_e = _e << 0b1
persistent.old_endings = persistent.endings
persistent.endings = endings
label storyline: