PhiIIz
|
  |
| Joined: 08 Mar 2015 |
| Total Posts: 1079 |
|
|
| 28 Feb 2017 09:05 PM |
Using scale on a GUI is easy. The issue is that the GUI's ratio isn't constant. For example, scale is relative to the screen by I also want the GUI's size to be at a constant ratio.
So the GUI basically will be responsive to the screen size by changing its X and Y size values but always keep its X and Y values at a specific ratio. I hope that makes sense.
How would I achieve this? |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2017 09:06 PM |
| use RelativeXX or RelativeYY sizing to maintain aspect ratio |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 28 Feb 2017 09:24 PM |
| http://wiki.roblox.com/index.php?title=API:Class/UIAspectRatioConstraint |
|
|
| Report Abuse |
|
|
PhiIIz
|
  |
| Joined: 08 Mar 2015 |
| Total Posts: 1079 |
|
|
| 01 Mar 2017 03:08 PM |
| Thanks chim. Is there an object I could use to center the GUI with the AspectRatioConstraint or would I have to code that? |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 01 Mar 2017 03:38 PM |
| Look into the AnchorPoint property. |
|
|
| Report Abuse |
|
|
PhiIIz
|
  |
| Joined: 08 Mar 2015 |
| Total Posts: 1079 |
|
| |
|