i.e. you understand
Code: Select all
init python:
# Step 1. Create the gallery object.
g = Gallery()
# Step 2. Add buttons and images to the gallery.
# A button with an image that is always unlocked.
g.button("coulson shooting")
g.image("coulson shooting")
Code: Select all
screen gallery:
tag menu
default character = "coulson"
use game_menu(_("Gallery"), scroll="viewport"):
style_prefix "character_gallery"
vbox:
spacing 23
hbox:
### CHANGE THIS TO MATCH WHAT YOU NEED
textbutton _("Phil Coulson") action SetScreenVariable("character", "coulson")
textbutton _("Agent May") action SetScreenVariable("character", "may")
textbutton _("Daisy") action SetScreenVariable("character", "daisy")
if character == "coulson":
use gallery_coulson
elif character == "may":
use gallery_may
elif character == "daisy":
use gallery_daisy
### CHANGE THIS TO MATCH WHAT YOU NEED END
style character_gallery_button is gui_button
style character_gallery_button_text is gui_button_text
style character_gallery_label is gui_label
style character_gallery_label_text is gui_label_text
style character_gallery_text is gui_text
style character_gallery_button:
properties gui.button_properties("character_gallery_button")
xmargin 12
style character_gallery_button_text:
properties gui.button_text_properties("character_gallery_button")
style character_gallery_label:
xsize 375
right_padding 30
style character_gallery_label_text:
size gui.text_size
xalign 1.0
text_align 1.0
Code: Select all
screen gallery_coulson():
style_prefix "character_gallery"
### ADJUST THIS GRID ACCORDING TO THE AMOUNT OF ROWS YOU WANT
grid 3 1:
xfill True
# Call make_button to show a particular button.
add g.make_button("coulson shooting", "coulson shooting thumbnail", xalign=0.5, yalign=0.5)
add g.make_button("coulson riding lola", "coulson riding lola thumbnail", xalign=0.5, yalign=0.5)
null
Code: Select all
image coulson shooting thumbnail:
"coulson shooting"
zoom 0.2