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 want to display a row of information, but because each column in my rows have a different width, it messes up the alignment when I stack my rows together.
vpgrid:
ypos 150
xalign 0.5
xsize 1000
cols 1
spacing 3
draggable True
mousewheel True
scrollbars "vertical"
side_xalign 1.0
hbox:
xysize (800, 50)
text "hello"
text "i am a test"
text "of alignments"
textbutton "!!" action NullAction()
hbox:
xysize (800, 50)
text "one"
text "i am a test"
text "of alignments"
textbutton "!!" action NullAction()
hbox:
xysize (800, 50)
text "longer column"
text "i am a test"
text "of alignments"
textbutton "!!" action NullAction()
Each cell of the hboxes have a variable xsize if you don't specify it.
You should use a style prefix and determine a fixed xsize for text and textbuttons.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
One thing, you are doing a grid...but you have only one column in your grid. So I'd say add columns. Also note that the size of each cell will be the size of the first cell, so you'll want to set the text_width in the first cell to be as wide as you want all the cells to be. Check this out:
screen testgrid():
vpgrid:
ypos 150
xalign 0.5
cols 4
yspacing 10
draggable True
mousewheel True
scrollbars "vertical"
# Since we have scrollbars, we have to position the side, rather
# than the vpgrid proper.
side_xalign 0.5
text "hello" min_width 200
text "i am a test"
text "of alignments"
textbutton "!!" action NullAction()
text "one"
text "i am a test"
text "of alignments"
textbutton "!!" action NullAction()
text "longer column"
text "i am a test"
text "of alignments"
textbutton "!!" action NullAction()
label start:
#scene bg_bedroom
show screen testgrid()
"Adjust your min_width as you see fit."
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
The only thing you have to make sure is that the first cell is the size you want all the other cells to be, then you don't need to do anything. So just make sure the picture is the size you want all the cells to be then you don't have to do anything more.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)