You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I think this is probably a Ren'Py bug rather than a coding mistake on my part, because this viewport was working perfectly fine pre-update, and now does not work at all despite changing nothing about it. I'm not entirely sure what aspect of it is causing issues—other viewports in my project seem to work fine.
Expected behavior: viewport allows for scrolling
Actual behavior: viewport does not scroll, scrollbar takes up entire height of viewport as if there was no content in the viewport, even though text can clearly be seen extending past the visible window
I isolated the screen in a new project and tested it on both release and nightly (8.3.0.24031805+nightly) and the issue persists in both versions. Attached is a zip file containing this isolated test project. To see the problematic viewport, launch the game in Ren'Py and click the "About" button on the main menu. Viewport_Test.zip
Viewport code:
transform ingamemenu:
on show:
zoom 0.8
yalign 0.5
alpha 0
ease 0.2 zoom 1.1 alpha 1
ease 0.1 zoom 1.0
on hide:
zoom 1.0
yalign 0.5
alpha 1
ease 0.2 zoom 1.1 alpha 0
transform tintbg(tint):
matrixcolor TintMatrix(tint)
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
image navy = Solid("#406258")
screen creditsModal():
layer "top"
modal True
use popupModal(0.5,(20,25),Frame(At("gui/ModalDialogwhite.png",tintbg("#b2e4d7")),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",tintbg("#406258")), 20,20)
text_xalign 0.5
padding (15,15)
text_size 17
xfill True
text_color "#fff"
action Hide("creditsModal")
The text was updated successfully, but these errors were encountered:
Some additional testing has brought me to the conclusion that the issue is caused by the fact that the text is within a vbox inside of a frame. It seems that the viewport is unable to "see" the contents of the nested child to know that it needs to be scrollable.
The issue also occurs if I switch around the frame and the vbox (so that the frame is inside of the vbox instead)
The only time I'm able to get the viewport to scroll is if the text is moved outside of the vbox (which is a problem when I want to arrange multiple elements vertically inside of this frame) or if only the vbox is used, and not the frame.
Which means the only way for me to get this viewport to scroll properly is to either a) sacrifice the frame's styling, or b) let all of the text elements stack on top of each other and be completely unreadable.
Both of these options are terrible.
It's possible to get it working with most of the styling and text not overlapping by putting the viewport in between the frame and the vbox instead of encasing both, (such that the vbox is the child of the viewport, which in turn is the child of the frame) but that messes up the padding and makes scrolling ugly (and i can't transfer the padding to the viewport or the vbox, since "padding is not a keyword argument or valid child of the [viewport/vbox] statement")
I know for a fact that nesting frames inside of vboxes inside of viewports was not a problem prior to updating, so this is definitely a Ren'Py bug.
Hi, I think this is probably a Ren'Py bug rather than a coding mistake on my part, because this viewport was working perfectly fine pre-update, and now does not work at all despite changing nothing about it. I'm not entirely sure what aspect of it is causing issues—other viewports in my project seem to work fine.
Expected behavior: viewport allows for scrolling
Actual behavior: viewport does not scroll, scrollbar takes up entire height of viewport as if there was no content in the viewport, even though text can clearly be seen extending past the visible window
I isolated the screen in a new project and tested it on both release and nightly (8.3.0.24031805+nightly) and the issue persists in both versions. Attached is a zip file containing this isolated test project. To see the problematic viewport, launch the game in Ren'Py and click the "About" button on the main menu.
Viewport_Test.zip
Viewport code:
The text was updated successfully, but these errors were encountered: