So I've got a Gallery that is kicking around GREAT. Lock/unlocks work, images display, it's awesome.
Here's the catch: I want each image to have a CUSTOM thumbnail - ONLY when it's unlocked. I've got em ready, but I have code in place (from a previous setup) that auto-creates that unlocked image. How do I disable this code and set up my own individual gallery icons (that also only appear when unlocked)?
Here's the basic code I'm rolling with:
Code: Select all
screen atlas_gallery:
tag menu
add "ui/menu_background.png"
add "gallery_ground"
use navigation
text "Gallery" xpos 415 ypos 25 size 40
frame:
style "atlas_gallery_frame"
area (23,105,768,650)
grid atlas_rows atlas_cols:
style_group "atlas_gallery"
$ i = 0
$ next_atlas_page = atlas_page + 1
if next_atlas_page > int(len(atlas_gallery_items)/atlas_cells):
$ next_atlas_page = 0
for atlas_item in atlas_gallery_items:
$ i += 1
if i <= (atlas_page+1)*atlas_cells and i>atlas_page*atlas_cells:
# $ atlas_item_text = str(atlas_item)
add atlas_gallery.make_button(name=atlas_item, unlocked="gal_icon_" + filter(str.isalnum, atlas_item), locked="ui/gallery_item_locked.png", style="atlas_gallery_grid_button", idle_border=filter(str.isalnum, atlas_item) + "_text",hover_border=filter(str.isalnum, atlas_item) + "_text_hover")
for j in range(i, (atlas_page+1)*atlas_cells): #we need this to fully fill the grid
null
Individual references look like this:
Code: Select all
# Placeholder Crew
atlas_gallery.button("Placeholder Crew")
atlas_gallery.condition("persistent.unlock_points >= 60")
atlas_gallery.image("gCplace")
Many thanks!