script.rpy
Code: Select all
if persistent.gallery_EV01 is None:
persistent.gallery_EV01 = False
if persistent.gallery_EV02 is None:
persistent.gallery_EV02 = False
if persistent.gallery_EV03 is None:
persistent.gallery_EV03 = False
if persistent.gallery_EV04 is None:
persistent.gallery_EV04 = False
####################################
# Initializing Gallery
init python:
gallery = Gallery()
gallery.transition = Dissolve(0.3)
gallery.button("EV01")
gallery.condition("persistent.gallery_EV01")
gallery.image("images/ev/ev01 01.png")
gallery.button("EV02")
gallery.condition("persistent.gallery_EV02")
gallery.image("images/ev/ev02 01.png")
gallery.button("EV03")
gallery.condition("persistent.gallery_EV03")
gallery.image("images/ev/ev03 01.png")
gallery.button("EV04")
gallery.condition("persistent.gallery_EV04")
gallery.image("images/ev/ev04 01a.png")
Code: Select all
screen extra():
tag menu
default current_tab = "gallery"
# Background
if current_tab == "gallery":
add "gui/back_gallery.png"
add "config_icon":
xalign 0.006
yalign 0.963
# Tabs
vbox:
style_prefix "extra_tabs"
# Gallery
imagebutton:
idle "gui/btn_tab_cgmode_off.png"
hover "gui/btn_tab_cgmode_over.png"
insensitive "gui/btn_tab_cgmode_over.png"
hover_sound "sse_02"
action [Play("sound", "sse_01"),
SetScreenVariable("current_tab", "gallery"),
SensitiveIf(current_tab != "gallery")]
if current_tab == "gallery":
default current_page = 1
# Page buttons
vbox:
style_prefix "gallery_page"
$ locked_image = "gui/btn_plate_back.png"
$ hover_image = "gui/thumb_cg/h_border.png"
grid 2 2:
style_prefix "gallery"
if current_page == 1:
# Button 1
add gallery.make_button(
"EV01", "gui/thumb_cg/EV_01.png",
locked=locked_image, hover_border=hover_image)
# Button 2
add gallery.make_button(
"EV02", "gui/thumb_cg/EV_02.png",
locked=locked_image, hover_border=hover_image)
# Button 3
add gallery.make_button(
"EV03", "gui/thumb_cg/EV_03.png",
locked=locked_image, hover_border=hover_image)
# Button 4
add gallery.make_button(
"EV04", "gui/thumb_cg/EV_04.png",
locked=locked_image, hover_border=hover_image)