Hi!
Recently , I’ve noticed that if I open the output window my GUI looks quite squashed.
I’ve tried many things including using AutoScale Lite’s built in features, Tried adding a constraint but again , it still looks squashed.
I use an ImageButton for each GUI individually.
Could anyone help me ? Without the output window open:
It’s possible you misused AutoScale’s constraint tool or you have your UI organized poorly. You may have to tweak it a bit to achieve the wanted result.
Hi!
Thanks for replying.
I’ve never really used UI constraints.
I tried adding one now to one of the GUIS , here’s how it looks like with the output window open:
As far as I know, the easiest way to prevent squashing is to set all the gui elements’ position to offset, and size to scale. I believe AutoScale Lite has functionality for that.
In the button’s parent frame, add a UIAspectRatioConstraint and set the aspect ratio to 1. Resize the scale as desired. Set the position to (0, 0, 0.5, 0) and its anchor point to (0, 0.5). Position its children using scale. Its children should respect their parent’s aspect ratio and scaling.
It’s important for the buttons to have a parent frame, and be positioned relative to its parent frame, so both size and position are properly scaled. You may notice elements overlapping each other/getting further apart from each other without relative positioning.
You can also achieve this behaviour without a UIAspectRatioConstraint and by setting the parent frame’s size constraint property.
While offset has its use cases, avoid it for creating responsive layouts.
You can make a frame the size of the buttons with a UIAspectRatioConstraint and insert a UIListLayout in it. Then add all the buttons in the frame and set the size of all buttons to {1,0},{1,0}