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.
The viewport seems to cut around it's children even multiple levels down. Anything offsetted outside the child area is not rendered. I assume it's related to the `child_size` mentioned in the docs, but `child_size(None,None)` doesn't seem to have any effect.
I'm not sure what exactly you are talking about to be honest.
Are you referring to your text "Some name" not showing up inside the viewport? The reason is, that you are positioning it outside of the screen (first you set xalign 0.0, which means xpos and xanchor to 0.0, then you set xanchor back to 1.0 and that means the right side of the text is going to align with the left side of the screen, pushing it outside. the xoffset only moves it further away). Just remove the xanchor 1.0 if you want to see it.
Maybe I am not understanding, what you are expecting here.
If you change the offset to a small number on the positive like 10, you'll notice that the text isn't outside of the screen, it's on the same place as the first example, but being cut off because it's just outside of the fixed container.
The only difference between the two is: one is indirectly inside a viewport.
I'm still unsure if this is really a valid bug or just bad programming. When you create frame, your intention should be to put stuff inside that frame and not put it outside of it. Because if you want stuff outside of that frame, why create a frame in the first place?
There are several good reasons to arrange elements the way I've done. The one in this case is: It makes positioning elements much easier. You can't really do something like this in any other reasonable way:
Imagine the frame's size is not a set size and changes depending on the content, and the text would change in size. All other tricks that might be able to mimic the look would go out of the window.