Extra Spaces fix

This commit is contained in:
Nutbuster 2021-07-11 11:39:48 +10:00
parent 059a1381bb
commit cb4ac81cae
1 changed files with 3 additions and 1 deletions

View File

@ -85,6 +85,7 @@ init python:
def loadGallery():
cgPath = "images/cgs/"
lazy_counter = 0
# Reset gallery
galleryItems = []
@ -100,9 +101,10 @@ init python:
unlocked = renpy.seen_image(str)
image = renpy.image_size(Image(_str))
addGalleryItem(str, ACCEPTED_EXTENSIONS[0], image[0], image[1], unlocked)
lazy_counter += 1
# Add empty items to fill grid after last cg button
extraSpaces = GALLERY_COLS - (len(galleryItems) % GALLERY_COLS)
extraSpaces = GALLERY_COLS - (lazy_counter % GALLERY_COLS)
for i in range(0, extraSpaces):
galleryItems.append({
"item": None,