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.
EDIT: Alex's solution is best, even says so in the documentation here: https://www.renpy.org/doc/html/screens.html#frame It takes one child. If zero, two, or more children are supplied, then a fixed is created to contain them.
screen screen_bla():
#use xalign yalign to position the main frame where you want on the window
# don't forget to change the size (xsize ysize) of this frame if you notice it's not moving from xalign yalign usage.
frame:
# space these frames by like 200 pixels using xpos and ypos
frame:
frame:
frame:
Is there anyway to control precisely where a textbutton goes for the side screen object? Like this for example?
screen screen590():
side "t tr r br b bl l tl":
side("t"): # explicitly tell side object you want this textbutton in top position
text "t"
side("tr"): # textbutton goes in top right position no mater what
text "tr"
side("r"):
text "r"
side("br"):
text "br"
side("b"):
text "b"
side("bl"):
text "bl"
side("l"):
text "l"
side("tl"):
text "tl"
Sometimes textbuttons maybe in certain positions, other times not. I generate textbutton's dynamically. If there's no textbutton needed for side Top for example, just leave it blank.
Last edited by henvu50 on Thu Jun 17, 2021 4:27 pm, edited 1 time in total.
henvu50 wrote: ↑Thu Jun 17, 2021 9:04 am
...Sometimes textbuttons maybe in certain positions, other times not. I generate textbutton's dynamically. If there's no textbutton needed for side Top for example, just leave it blank.
You can set positions for each button individually. Don't need to put them inside any container (vbox/hbox/frame/fixed).
Or you can put buttons inside a container to positioning this container.
What exactly you want to achieve?
If you need a frame with buttons in it you could try:
either 'side' (as you've posted) with if's to check if it should be a button placed on or a null (to fill up all the positions set for 'side'),
or use 'fixed', set its size and align all the buttons inside it.