I want second viewport to have the same width as first one. I could find exact width by trial and error, but I expect size of first vpgrid to change during development and maybe even ingame, so hardcoding width(s) is not something I want to do.
So, is there any way to get width of previous item or solve this problem in some other way?
Fragment of screen code (with almost-correct width set manually):
Code: Select all
vbox:
spacing 8
vpgrid:
ysize 500
cols 4
spacing 4
mousewheel True
scrollbars "vertical"
for item in items:
textbutton "{size=14}Button{/size}":
xysize (96, 96)
action Return()
viewport:
mousewheel True
scrollbars "vertical"
xsize 400
use item_info