Maintaining Gui Objects to always be a Square


#1

No, I’m not using UIAspectRatioConstraint it’s basically not what I want because of these effects

It does maintain the Gui Objs as a Square but just look at it, it solves one problem and creates a new problem so no, DO NOT even mention it.


I’m asking for Tips & Tricks and Advance Gui Designers use to figure out the perfect Ratio to Maintain the Gui Obj size.


I almost pulled my head off because I resized it soo many times and it’s either too Fat or too Thin and it’s really getting on my nerves, In studio there is also a White bar at the bottom of the Screen which makes Resizing even more difficult to do.:exploding_head:

The problem is it looks perfectly fine on my Screen in studio and then when I play the game it’s either too thin or too fat again. :sob:

Please help me I’m going to be insane because of this… :crazy_face:


#2

Have you tried setting the SizeConstraint Property to be RelativeXX or RelativeYY instead of the default RelativeXY.

This Post might also help you.


#3

Yes I forgot to mention that it also creates a new problem…

Relative XX Effect

I don’t think I have to show you what Relative YY does.


#4

RelativeXX only scales along the X Axis and RelativeYY only scales along the Y axis. And RelativeXY does both.

Make sure you’ve set it to what you want it to scale along by using the Constraint. And make sure its parent Frame/Button/Textbox isn’t affecting the size of it too too much. Because the parent does largely affect the size and scaling.

Edit: Eg. From experimenting a Square Frame set to RelativeYY will scale smaller, when its parent Frame which is set to RelativeXX is made smaller along the X Axis. Works Vice-Versa as well.


#5

I read the thread and It seems like I have to choose between Relative XX or YY

I think I’ll just go for XY because even if it’s not a Square it’s so much better than having weird side effects.


If you use Offset when X is = Y however it will always be a square no matter what but the problem is I have no idea how to convert Offset to Scale.

Until someone provides a Script or Plugin, I’ll just suck it up :persevere:


#6

I’m sure someone will figure out your problem. They always do!


#8

Well, only thing you can really do is: Wait and see.


#9

Speaking of offset to scale plugins, here’s this one:

I use it on a daily basis for GUI work. A good thing about it too, is it can convert from scale to offset and offset to scale. Its pretty nifty and I recommend it. :slight_smile:


#10

Thank you! this is indeed useful but I already have a similar plugin that can do the same.(It allows you to Drag Guis and Resize them)

I am hoping for someone to post a script that can convert Offset to Scale and Scale to Offset so that I can use it in game.