Gallery pan?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Qu-ko
Regular
Posts: 54
Joined: Sun Jun 18, 2006 12:27 am
Location: Massachusetts, land of evil-ness
Contact:

Gallery pan?

#1 Post by Qu-ko »

So I know I asked this question in the other thread, but I figure it's not going to attract as much attention with the title concerning something else. Plus, I didn't get an answer ANYWAY, so... I figured it wouldn't hurt to ask again.

Is it possible to make the full image shown, when you click on it in the new gallery, pan upwards if it's too large vertically to fit on one screen? I'd really like to be able to do this, as I think it'd look a bit better than just a dissolve. I tried messing around with the settings a little, but didn't get anywhere, so I figured I should ask the experts... ;x

I promise I'll fade back into the shadows after this one, really! >_>
ヾ(゚Д゚)ノ うわあああぁぁぁぁぁぁぁ―――――――

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Gallery pan?

#2 Post by PyTom »

You want to use the Gallery.display method to set a displayable, and then Gallery.unlock to unlock it. Assuming your gallery object is named g, the following code would do it:

Code: Select all

# declare the button this will be attached to.
g.button(...)

g.display(At("big_image.jpg", Pan(...)))
g.unlock("image name")
Hopefully, this makes some sense.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Qu-ko
Regular
Posts: 54
Joined: Sun Jun 18, 2006 12:27 am
Location: Massachusetts, land of evil-ness
Contact:

Re: Gallery pan?

#3 Post by Qu-ko »

It worked. ^^

I'll modify it to my liking, then. Thank you for that!
ヾ(゚Д゚)ノ うわあああぁぁぁぁぁぁぁ―――――――

Post Reply

Who is online

Users browsing this forum: Bing [Bot]