Ren'Py update 8.2.1 broke scrolling on a viewport

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
trailsiderice
Regular
Posts: 69
Joined: Fri Sep 29, 2023 4:02 pm
Contact:

Ren'Py update 8.2.1 broke scrolling on a viewport

#1 Post by trailsiderice »

At least, I assume it was the last update that broke it, because I haven't changed anything about this viewport setup since before updating, and it was working perfectly fine before, but now it doesn't work at all. A text viewport that, prior to updating to 8.2.1, used to scroll perfectly fine, now does not scroll at all. As a test, i tried adding a scrollbar to it (it didn't have a scrollbar before) and the scrollbar takes up the entire right side, telling me that the game for some reason things that this viewport doesn't have anything to scroll, even though it certainly does.

here's my code, contents of the viewport replaced with lorem ipsum for testing purposes:

Code: Select all

screen popupModal(ypos,padding,bg=Frame("gui/ModalDialogwhite.png", 19,19),ymax=None):
    modal True
    layer "top"
    add "gui/overlay/confirm.png"
    frame:
        if ymax is not None:
            ymaximum ymax
        background bg
        at ingamemenu
        xsize 438
        align (0.5,ypos)
        padding padding

        transclude

screen creditsModal():

    layer "top"
    modal True
    use popupModal(0.5,(20,25),Frame(At("gui/ModalDialogwhite.png",tintbg("#c6dfe4")),19,19)):
        vbox:
            text "Credits" color "#000" xalign 0.5
            spacing 10
            side ("c r"):
                viewport id "creditsvp":
                    mousewheel True
                    draggable True
                    ysize 300
                    frame:
                        padding (15,15)
                        xfill True
                        yfill True
                        style "empty"
                        background "navy"
                        vbox:
                            xfill True
                            text "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Risus nullam eget felis eget nunc lobortis mattis aliquam faucibus. Euismod elementum nisi quis eleifend quam. Vulputate dignissim suspendisse in est. Consequat ac felis donec et. At auctor urna nunc id cursus metus aliquam. Pulvinar pellentesque habitant morbi tristique. Amet nisl purus in mollis nunc sed id semper. Dignissim sodales ut eu sem integer vitae justo eget magna. Mattis enim ut tellus elementum. Amet nisl purus in mollis nunc sed id semper risus. Dis parturient montes nascetur ridiculus mus mauris vitae ultricies leo. Nisl nunc mi ipsum faucibus vitae. Neque vitae tempus quam pellentesque nec nam aliquam sem et. Est ultricies integer quis auctor elit sed vulputate mi. Egestas tellus rutrum tellus pellentesque eu tincidunt tortor. Eget nulla facilisi etiam dignissim diam quis enim. Adipiscing at in tellus integer feugiat. Consectetur adipiscing elit duis tristique sollicitudin nibh sit amet commodo. Sodales neque sodales ut etiam sit amet nisl purus in. Mi tempus imperdiet nulla malesuada pellentesque. At auctor urna nunc id cursus metus aliquam eleifend. Eget nunc scelerisque viverra mauris in aliquam sem fringilla. Id aliquet lectus proin nibh nisl condimentum id venenatis a. Euismod nisi porta lorem mollis aliquam ut porttitor leo. Elit pellentesque habitant morbi tristique senectus et netus et. Nibh sit amet commodo nulla facilisi nullam. Mattis vulputate enim nulla aliquet porttitor lacus."
                vbar value YScrollValue("creditsvp")
            null height 10
            textbutton "BACK":
                background Frame(At("gui/ModalDialogwhite.png",tintnavy), 20,20)
                text_xalign 0.5
                text_font "Lato-Regular.ttf"
                padding (15,15)
                text_size 17
                xfill True
                text_color "#fff"
                action Hide("creditsModal")

I'd appreciate some advice on how to fix this.

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Ren'Py update 8.2.1 broke scrolling on a viewport

#2 Post by jeffster »

If it's a bug, then there are good chances that it will be fixed soon.

To help with that, you could follow "Bug Replications" instructions:
viewtopic.php?t=20031

Most importantly, try to
- provide a standalone game that quickly demonstrates the problem,
(as a minimal example perhaps?)
- make sure that the bug manifests with the latest Ren'Py version.

Apart from the forum posts, it's advisable to use the bug tracker:
https://github.com/renpy/renpy/issues

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Ren'Py update 8.2.1 broke scrolling on a viewport

#3 Post by Imperf3kt »

viewports work great for me on 8.2

What happens if you delete this part

Code: Select all

if ymax is not None:
            ymaximum ymax
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

trailsiderice
Regular
Posts: 69
Joined: Fri Sep 29, 2023 4:02 pm
Contact:

Re: Ren'Py update 8.2.1 broke scrolling on a viewport

#4 Post by trailsiderice »

Imperf3kt wrote: Sun Mar 17, 2024 7:22 pm viewports work great for me on 8.2

What happens if you delete this part

Code: Select all

if ymax is not None:
            ymaximum ymax
The viewport still doesn't work. The only thing that changes is that the frame takes up the entire vertical length of the screen. (which is not what I want, visually.) Doesn't allow for scrolling though, despite the text within the viewport exceeding the length of the screen.

Also, it's not viewports in general that are broken. I have other viewports that seem to work fine. This one has stopped working. I know it must be something to do with the update though, because again, it was working just fine before the update, and now doesn't, despite me changing nothing about it.

I'll see if i can replicate the problem in a blank project when I get a chance so that I can report it as a bug.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Milkymalk