Default new Studio-inserted UI objects to use Scale instead of Offset

As a Roblox developer I spend too much time setting new Gui Objects to use scaling instead of offset.
If you’re not in the know then let me explain the difference between scaling and offset. Offset is based on pixels and scaling is a percent of the parent object. Roblox currently defaults to {0,100},{0,100} for new objects, and it’s infuriating to go through and remove the 100’s and set it to something useful. I am surprised this is even an issue for Roblox, because Roblox is built on cross compatibility which is what scaling is there for.

10 Likes

Scaling is more useful than you might think. Imagine you have a button with a 100x200 background image which you get to look 100x200 proportionally on your 16:9 screen, but then someone else sees it on their 4:3 screen. Sadly, personally, I did this for many, many years without realising. Stretching/scaling inappropriately images and other UI elements can really make the “graphics design is my passion” meme apply.

I think back then, the default value for UDim2 was {0,0,0,0}, and it was the default setting being changes which got me interested in investigating to as to why, and then learn more into UI sizing/scaling, so personally I’m not convinced changing the default would be beneficial.

2 Likes

One of the many beneficial use-cases towards making UI elements use scale by default rather than offset is the UI Editor. With no real communication about whether the UI Editor would be able to be toggled on or off, it’s only fair to mention that as a developer, we should expect the UI Editor to use scale and thus changing the default can help immeasurably for anyone who is not used to the Roblox engine. Currently, the UI Editor selects whatever the default size & position is, and since the default is in offset, we see terribly made UI due to the fact that it doesn’t scale and work with every device.

Making the change from offset → scale would benefit even the knowledgeable devs since we can quickly use and work with these new defaults much faster than having to work with the offset default.

4 Likes