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.
I attached schematic image of frame contents illustrating what I want. Note that widths and heights of first, second, third and fourth are not fixed. And some of these elements may be absent at all. So, I can't do something like that:
I think the closest you'll get to float:right is xalign. Read through a couple of the style properties in the documentation, especially the xalign and xanchor properties.
For the widths of the other elements, you should check for their existence first, then set xsize and ypos accordingly.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails
Yeah, I thought about calculating sizes and positions manually... but hoped that it's possible to avoid that
BTW, is there way to get size of a widget? Something like that maybe:
Hmm. This is how I would go about it: have the frame on the right be a separate screen and use it in the first screen. Have a vbox with the first two elements, with a max width and min height to match the frame on the right. Have another vbox with the other two elements. Seems like it should get close enough.
philat, problem is that I don't know heights of first and second in advance. I can't say for sure that first.height + second.height == float.height. It is totally possible, for example, that height of first will be equal to height of float, so second should be full-width.
That's why I need a way to get size of widget during run-time.
Ah, I see I misunderstood the OP -- I thought if the elements weren't there, you would leave blank spaces. I don't think there's an easy way to do this, but someone more learned than I am in the intricacies of screen language may have a better idea.