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'm using vertical bars in a grid, and the alignment appears to be to the left side in each element of the grid. I've tried xalign 0.5, but I don't see how to align the bar to the center of the grid element. Each grid element is set to xsize of 150 because of the labels in the row below, so ideally the bars would align at 75, but they dont
That's not working as expected either. The way I would *like* it to work is for everything to use relative positioning inside the grid cells, the equivalent of formatting an excel cell with 'center' both for the bars and the labels.
I set the cell width to 150 just to get the spacing approximately correct in terms of layout on the screen, but I can't seem to understand the positioning *inside* the grid.
You don't seem to apply the xalign to the elements at all. The xalign 0.5 directly under grid 5 1: tells renpy where the GRID should be positioned, not where the elements should be positioned within the grid. (Unless you have the xalign hidden in the column_bar style.)
As an aside, I'm not sure why you have two 5 1 grids rather than one 5 2 grid -- or, for that matters, nested hbox/vboxes. Those are generally easier to deal with because they take box properties while grid cells don't.