I was just making a dialogue box and I realized, “hey, there should be a plugin to convert offset to scale.” So I just made that…
If you have no idea what this means, it basically allows your UI to size by a percentage of the screen, rather than an amount of pixels. This is absolutely great to do, and it’s strange that Roblox UI doesn’t do this by default.
With this button, making your UI compatible with all screen sizes is just one click away. Here’s a video of the plugin in action:
How it’s made:
This plugin is extremely simple. Here are the steps:
Get the viewport size
Loop through each selected object
The most important part, divide offsetX / viewportX to get a decimal that you can use as a scale value (repeat step for Y)
Previously, trying to convert a GUI object inside of another GUI object (in my case, an imagelabel in a frame), it would squish it weird. That is now FIXED.
After fixing the above bug, another one appeared: trying to convert a GUI object inside of another GUI object that had scale instead of offset would cause the math to be infinite scaling (number divided by 0) and cause the GUI object to simply disappear. That is now FIXED.
Yeah one extra is very different. Anyway, would it make it better if I made an automated version for free? Like it auto-does this as soon as you add in a GUI element? “Oh but that guy made that.” Mine can be free.