Page 1 of 1

should vpgrid takes position size properties?

Posted: Sun May 23, 2021 1:30 pm
by smollvrn
should vpgrid takes position size properties?

Image

Code: Select all

screen char:
     vpgrid:
            yfill True
            xminimum 427
            cols 1
            scrollbars "vertical"
            side_xalign 0.0
            vbox :
                text "1" 
label start:
     show screen char
     "scrollbar test"
return 

Re: should vpgrid takes position size properties?

Posted: Sun May 23, 2021 4:16 pm
by Imperf3kt
vpgrid gets its size from its children and its position from its parent.
https://www.renpy.org/doc/html/screens.html#vpgrid

Re: should vpgrid takes position size properties?

Posted: Sun May 23, 2021 5:36 pm
by smollvrn
Imperf3kt wrote:
Sun May 23, 2021 4:16 pm
vpgrid gets its size from its children and its position from its parent.
https://www.renpy.org/doc/html/screens.html#vpgrid
In addition, a vpgrid takes all properties a viewport can, and the following groups of style properties:

Common Properties
Position Style Properties
Position Style Properties
xmaximum - int
ymaximum - int
maximum - tuple of (int, int)
xminimum - int
yminimum - int
minimum - tuple of (int, int)
xsize - int
ysize - int
xysize - tuple of (int, int)
Grid Style Properties

https://www.renpy.org/doc/html/screens.html#vpgrid

Re: should vpgrid takes position size properties?

Posted: Mon May 24, 2021 9:41 pm
by PyTom
So, this was a change in 7.3.3, albeit a obscure one - the xminimum and yminimum properties weren't listed as position properties. If a vpgrid has a side, position properties go to the side containing it, and not the viewport itself. To give the xminimum to the viewport, you need to use viewport_xminimum:

Code: Select all

screen char:
     vpgrid:
            yfill True
            viewport_xminimum 427
            cols 1
            scrollbars "vertical"
            side_xalign 0.0
            vbox :
                text "1" 
label start:
     show screen char
     "scrollbar test"
     return