Hello,
I'm having a hard time making a button, which would zoom-in the current gallery item. I tested that the button appears on the screen correctly:
vbox xalign 0.98 yalign 0.1:
imagebutton:
idle "gui/zoom_idle.png"
hover "gui/zoom_hover.png"
action NullAction()
but honestly I simply don't understand, which action should do the trick. I've already tried the zoom (as in ATL), but I get the error that this parameter uses the screen language. Studying the screen language, I found the im.Scale parameter, but it seems I can't use it correctly as well.
Which action should be placed here?
P.S. By the way, I'm placing this button near the grid and return button on the gallery screen.
Zoom-in button for image gallery
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.
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.
-
- Newbie
- Posts: 23
- Joined: Wed Dec 09, 2020 4:04 pm
- Contact:
Re: Zoom-in button for image gallery
There are several ways to do it. If you want to use ATL transform to an image in a screen, do:
You can give this a condition (if) so it can be shown and hidden by button actions.
Another way is to show a different screen containing the zoomed in image, or you can also call a label on action and return to your screen when done.
The best method depends on what you exactly want to achieve~
Code: Select all
add “image_name.png”:
at TransformName
Another way is to show a different screen containing the zoomed in image, or you can also call a label on action and return to your screen when done.
The best method depends on what you exactly want to achieve~
-
- Newbie
- Posts: 23
- Joined: Wed Dec 09, 2020 4:04 pm
- Contact:
Re: Zoom-in button for image gallery
emz911 wrote: ↑Fri Apr 30, 2021 12:56 am There are several ways to do it. If you want to use ATL transform to an image in a screen, do:You can give this a condition (if) so it can be shown and hidden by button actions.Code: Select all
add “image_name.png”: at TransformName
Another way is to show a different screen containing the zoomed in image, or you can also call a label on action and return to your screen when done.
The best method depends on what you exactly want to achieve~
Thank you. It's more complex than I've thought, but doable.
Re: Zoom-in button for image gallery
Came across this thread and found that there is an one step action you can do to show images with transform on screen:
viewtopic.php?t=45661
viewtopic.php?t=45661
Code: Select all
Function(renpy.show, "my_image", at_list=[my_transform])
-
- Newbie
- Posts: 23
- Joined: Wed Dec 09, 2020 4:04 pm
- Contact:
Re: Zoom-in button for image gallery
Sorry for the late answer, did not see that you responded again. I defined the new transform (galleryzoom) and used a test image. It doesn't seem to do anything, I don't even get any error, it just doesn't work.emz911 wrote: ↑Wed May 05, 2021 1:21 pm Came across this thread and found that there is an one step action you can do to show images with transform on screen:
viewtopic.php?t=45661Code: Select all
Function(renpy.show, "my_image", at_list=[my_transform])
Who is online
Users browsing this forum: fufuffiero, Majestic-12 [Bot], Sugar_and_rice