Aurified
(Aurified)
May 20, 2021, 5:37pm
#1
Hello, I have been working on a store menu for my GUI and I wanted to have different sized frames for each product. In order to achieve this, I inserted a UIGridLayout and set the cell size property to {0, 0},{0, 0} and added a UISizeConstraint to each of the frames to adjust the size. It works fine but the problem is that it works as if it was scaled using offset (obviously). I was wondering if there was an alternative solution to get the result that I’m looking for.
The result I’m looking for:
See how the frames are scaled
The result I have:
See how the frames are not scaled
UISizeConstraint properties:
Put a UIAspectRatioConstraint inside the UIGridLayout , then set the cell size in UIGridLayout .
Also remove all the UISizeConstraints , and UIAspectRatioConstraints inside each frame. You only want one UIAspectRatioConstraint in the UIGridLayout .
Aurified
(Aurified)
May 20, 2021, 5:45pm
#3
Alright, I’ll try this out when I come back home.
1 Like
Aurified
(Aurified)
May 21, 2021, 12:32am
#4
I just tried it out and it works fine for one of the frames but the other frame has the exact same size.
Isn’t that what you want?
I think he wants the images to be fitting correctly just change the imagelabel property from stretch to crop tell me if changed it
Aurified
(Aurified)
May 21, 2021, 1:03am
#7
I wanted these different sized frames to scale correctly when the screen is stretched or compressed.
In other words, I want something like this with the different sized frames I provided in the picture before:
https://gyazo.com/ea78b7c47b9b7abc6b581b1453f68d51
However, this is what I’m initially getting:
https://gyazo.com/b8e77f97189ec918aea4fcd1085b5286
Aurified
(Aurified)
May 21, 2021, 1:04am
#8
I don’t think that property would help since the frames have different sizes.
Oh well then 100% use aspectratioconstraints
I do not know the rest you need
Oh okay, in that case set the UIGridLayout
cell size to only use Scale
Aurified
(Aurified)
May 21, 2021, 1:08am
#12
Hmm… Still no luck. Would you like a copy of the place so you can take a look into it?
try using UiSizeConstraint with a UIAspectRatioConstaint inside
Aurified
(Aurified)
May 21, 2021, 1:11am
#16
DevForums Copy.rbxl (33.4 KB)
Here’s the copy. I removed some unimportant stuff so it may look different but overall, it should be enough.
Aurified
(Aurified)
May 21, 2021, 1:12am
#17
I’ve tried that but it didn’t do much. You could take a look at the file I’ve attached above.
I can’t my PC can barley handle 1000 parts anchored
Aurified
(Aurified)
May 21, 2021, 1:13am
#19
It’s just the GUI and nothing else.
So the gui constraints for some reason break my pc thats why I only use corners lists and grids sometimes ratios the others break my PC i needed to use my other PC