Code: Select all
They expect button images to be 155x112 in size.
Here is the complete code
Code: Select all
init:
# Position the navigation on the right side of the screen.
$ style.gallery_nav_frame.xpos = 1650 - 10
$ style.gallery_nav_frame.xanchor = 190.0
$ style.gallery_nav_frame.ypos = 160
# Add the gallery to the main menu.
$ config.main_menu.insert(2, ('Gallery', "gallery", "True"))
# The entry point to the gallery code.
label gallery:
show screen a
show screen navigation
show screen navigation2
python hide:
# Construct a new gallery object.
g = Gallery()
# The image used for locked buttons.
g.locked_button = "images/mini/gallocked.png"
# The background of a locked image.
g.locked_background = "gui/file_picker_gallery.jpg"
# Frames added over unlocked buttons, in hover and idle states.
g.hover_border = "images/transparente.png"
g.idle_border = "images/transparente.png"
# An images used as the background of the various gallery pages.
g.background = "gui/file_picker_gallery.jpg"
# Lay out the gallery images on the screen.
# These settings lay images out 3 across and 4 down.
# The upper left corner of the gird is at xpos 10, ypos 20.
# They expect button images to be 155x112 in size.
g.grid_layout((2, 3), (50, 200), (720, 420))
# Call make_button to show a particular button.
# We can use g.page to introduce a second page.
g.page("{size=-15} {/size}\n{size=+20} Eileen {/size}\n{size=-15} {/size}")
g.button("images/mini/mini-tercercg.png") # this is the image for a unlocked CG
g.unlock_image("Beach_club") # this is the image that ll be unlocked you must use the same name for the CG when you define it
g.unlock_image("Beach_club2") # this is the second image that ll be unlocked in a set of 2 images
g.button("images/mini/mini-tercercg.png")
g.unlock_image("Beach_club3")
g.button("images/mini/mini-tercercg.png")
g.unlock_image("Beach_club")
g.button("images/mini/mini-tercercg.png")
g.unlock_image("Beach_club")
g.unlock_image("Beach_club2")
g.show()
jump main_menu_screen