UIGridLayout doesn't update the position propery. Having trouble with item stats UI

Hello community,

I am having some trouble making a UI that shows the stats of an item, since UIGridLayout doesn’t update the position propertiy of the UIObjects under UIGridLayout’s parent.

That problem causes this, when I use a mouse hover event to position the menu with the stats next to the item position, it positions the same in all items, since their position property is not modified by UIGridLayout:

This is the intended behavior:

If you know any other way I could do this please say it.

Thanks for reading. Any help is appreciated.

https://i.gyazo.com/d94642f91b34ac60fef0b9e2670e9751.gif

Is this what you are trying to achieve? I achieved this by having another frame overlap the main frame. The sub frame have a transparent background. As for positioning a gui next to it, I used the cell size and cell padding of the uigridlayout, and the cell index. (You can get cell index by using getchildren() on the main frame. The order is determined by first parent.

1 Like

Does this work when there are multiple layers of items too?

I would place the stats inside of the object you’re hovering. Then just position it to your desired spot.

I tried that, but its glitches and puts the stats UI behind the other objects, even if I force the opposite with zindex.

Sorry, what do you mean by that? If as in columns and rows then yes.

1 Like

He likely means multiple frames with multiple UI instances in each.

Nope, I meant rows and colums.

Oh, by multiple layers I figured you were referring to multiple grid layers. With each grid having rows and columns.

1 Like

I have had problems recreating what you described, would it be possible for you to send a place file or a code snippet? Thank you.

Yes, it is possible.
image
image

1 Like