YUI
YUI copied to clipboard
grid alignment not working as expected
I would expect center: true to center the grid within the panel, but it isn't doing so.
Here's the code I am using:
` root:
type: panel
layout: canvas
elements: - type: panel
size: { w: 300, h: 200 }
canvas:
top: 0
center: true
background: sprInventoryFrame
layout: grid
padding: 0
grid:
rows: 4
row_height: 28
row_spacing: 6
columns: 6
column_width: 28
column_spacing: 6
elements: @inventory.contents
template:
type: inventory_item_slot
`
And here's the result:
I think I can use the new flexpanel support in 2024.8 to address this... eventually. Currently I can't use it because I need to be able to define custom measure functions to handle dynamic sized text. I have an FR open for it here: https://github.com/YoYoGames/GameMaker-Bugs/issues/7419