|
| 03 Jul 2016 02:10 AM |
Yes, yes there's always two ways for creating a sizing/positioning factor. Use offset and have gui look nice and proportional, but goes of screen. Or, of coarse you could use scaling, which anchors objects to the screen, but makes everything look squished. Though there is a way to combine both by taking the axis that changed:
1) Scaling one of the objects axis with the camera's axis that changed (taking the offset value of size/position and dividing it by the original dev's ViewSizeport)
2) then scaling the other gui's axis porpotionally to first one.
Hope you could understand all that. I don't know the correct term for this method, it' probably a thing. Right? Here's the link to a script that I made if it helps --> (https://www.roblox.com/item.aspx?id=446920328).
So what's you opionin on this method. Is it useful? Should it be added to the UDim2 type? And what situation would you use this in, in a game (ex. intro, lobby)? |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2016 02:19 AM |
It depends on what you're doing, sometimes using offset for everything is the best method, sometimes using scale is the best. And sometimes a mixture.
If I'm going to deal with squares/rectangles/circles/whatever, I would deal with offset and use a script to resize it when the size of the screen changes or whatever. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2016 12:37 PM |
| Regardless if dev's are using scale or offset, they usually want a frame to have a certain X:Y size/position ratio. Seriously people should start using this method. Try it for once. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2016 01:02 PM |
Wait, isn't this what SizeConstraint does? I mean, why make a module if SizeConstraint does exactly this? And I'm not sure it does, but I think it does. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2016 01:07 PM |
| Oh, that is what SizeConstraint does. I think your module went obsolete before you even started coding it. |
|
|
| Report Abuse |
|
|
Entelicon
|
  |
| Joined: 06 Nov 2012 |
| Total Posts: 1002 |
|
| |
|
|
| 03 Jul 2016 02:25 PM |
| I support this, except that SizeConstraint is already a thing. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2016 03:28 PM |
| Lol I guess I never really understand the property. Though my script works in changing both axis if the other is changed, instead of only changing the Y axis or the X, right? |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2016 03:35 PM |
Okay, that's something it can't do, if I understand right.
The settings make it so that Scale goes proportional to both axes, the X axis, or the Y axis. So if you set it to be proportional to the X axis, and you resize the windows Y, then it will not resize. |
|
|
| Report Abuse |
|
|