Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Ways to code gui, and Gui Offset and Scale?

Asked by
truted1 21
4 years ago

I have 2 questions: How do you go about coding gui's. I see some people have 1 script for the whole thing, and other have a script for each frame or button. What ways is best or easiest?

My second question:Is there a way to make the UI editor use offset not scale?

Thanks?

1 answer

Log in to vote
0
Answered by
7z99 203 Moderation Voter
4 years ago
Edited 4 years ago

Generally, using one script per object is simpler and easier to organize.

This second part isn't really scripting but I'll answer it anyway.

Offset and scale are two different things.

Offset changes the offset of something, for every device, so for example, on a small monitor, the 30 pixels would appear to have a larger impact than on a large monitor.

Scale is most often used in professional development to keep the size of your GUI consistent throughout different monitor sizes, there are also plugins to help with this. I use two, click here for the first one, and click here for the second one. These generally make it easier. While doing a bit of research, I came across this. It hasn't been updated in a bit, and therefore could be obsolete, but it's worth a shot.

If you don't want to use plugins, there is a good explanation here which involves some math behind it.

Ad

Answer this question