0

I'm working in a pygame made in renpy, a visual novel. I'd like to do a "album screen" where the images colected will be shown. On bottom side I'd like do make an carousel.

The images will be salved in a array.

I'm trying this:

  #definindo as imagens
image A1 = "A1.jpg"
image A2 = "A2.jpg"
image A3 = "A3.jpg"

# função em python e transform
transform foto_point:
    zoom 0.13

transform foto_side:
    zoom 0.1

init python:           
    def mid_images(direction):
        global mid_image  

        if direction == "right":
            if Seny_images.index(mid_image) < Seny_images.lenght(mid_image):
                mid_image = Seny_images[Seny_images.index(mid_image) + 1]
                    
        elif direction == "left":
            if Seny_images.index(mid_image) >0:
                mid_image = Seny_images[Seny_images.index(mid_image) -1]

screen imagelab:
    add "A2.jpg"
    imagebutton idle "A1" align(0.7, 0.8) at foto_side 
    imagebutton idle "A1" align(0.5, 0.8) at foto_point
    imagebutton idle "A1" align(0.3, 0.8) at foto_side
    imagebutton idle "arrow-left" align(0.18, 0.8) action Function(mid_image, direction = "left")
    imagebutton idle "arrow-right" align(0.82, 0.8) action Function(mid_image, direction = "right")

label start:
    $ Seny_images = ["A1", "A2", "A3"]
    $ mid_image = Seny_images[0]
    call screen imagelab
    
    return
Milla Dma
  • 25
  • 3

0 Answers0