YUI icon indicating copy to clipboard operation
YUI copied to clipboard

grid alignment not working as expected

Open tthrelfo opened this issue 1 year ago • 1 comments

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:

image

tthrelfo avatar Jul 14 '24 04:07 tthrelfo

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

shdwcat avatar Nov 04 '24 02:11 shdwcat