Scaling the entire contents of a ScreenGui

As a developer, porting GUI from tablet to phone screens is very hard. What I essentially want to do is just scale everything by a factor of .7 or so. However, in order to do this, I need to rewrite a bunch of GUI code and change lots of sizes and positions manually. What I propose is a feature that does the following:

  1. Takes a “canvas size” of a ScreenGui and draws everything inside that ScreenGui as if the size of the screen was this canvas size.
  2. Scales everything so that it fits into the actual screen size.

It would probably be best to represent this canvas size this as a single number property of ScreenGui called “CanvasScale” or something like that. For example, a CanvasScale of 2 on a 800x600 screen would render the contents of the ScreenGui as if the screen size were 1600x1200 and then scale the result by a factor of 1/2.
A Vector2 canvas size property would only be useful for people who want to do a nonuniform scale of their UI, which would probably be ugly and could potentially make the job of implementing this feature harder.

1 Like

??

6 Likes

Wow, I thought that did something else because it wouldn’t change the preview in Studio.

Yeah, to be honest I wrote a whole module to do the scaling for me, was a lot of tedious math, then that came out making my module useless lol

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.