Code: Select all
##ToDo: Make sure the button which leads to the gallery has the action listed below.
button:
action [ShowMenu("gallery_navigation"), Show("gallery")
################################################################################
## Gallery screen
################################################################################
## Gallery Images
init python:
g = Gallery()
## Your Gallery Items
## ToDo: Copy Paste these two lines and add your buttonname and imagename/path of the cg, do that for all cg's.
g.button("Gallery_Button_Name")
g.unlock_image("Gallery_Image.png")
g.transition = dissolve
## Variable for CG Page
default cg_page = 1
## Gallery Part 1, Navigation
screen gallerynavigation():
## Background Image of the Gallery
## ToDo: Add your gallery background.
add "Background.png"
vbox:
xalign 0.0
yalign 0.5
spacing 20
## Your Gallery Pages (1-3).
## ToDo: Copy/Paste and change the number if you need more pages. Names can be anything from numbers to character names.
textbutton ("1") action SetVariable("cgpage", 1)
textbutton ("2") action SetVariable("cgpage", 2)
textbutton ("3") action SetVariable("cgpage", 3)
textbutton ("Return") action [Return(), Hide("gallery_navigation")]
## Gallery Part 2, Content
screen gallery():
zorder 100
tag menu
## Gallery Buttons for Page 1, CG 1-9.
## ToDo: Copy/Paste this section and change the number for the second, third etc page.
if cg_page == 1:
grid 3 3:
## Adjust these numbers as you wish.
xalign 0.5
yalign 0.5
xspacing 20
yspacing 20
## The actual gallery content.
## ToDo: Add 9 buttons from the ones you created by writting the name and adding the other info in or add null for any empty slots in case the grid wont be full.
add g.make_button("Gallery_Button_Name", "Gallery_Image_Thumbnail.png", "Gallery_Locked_Thumbnail.png")
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/gallery.rpy", line 3: is not terminated with a newline. (Check strings and parenthesis.)
action [ShowMenu("gallery_navigation"), Show("gallery")
Ren'Py Version: Ren'Py 7.1.3.1092
Wed Feb 13 13:04:06 2019
Code: Select all
hotspot (778, 647, 274, 52) action ShowMenu ("gallery")