|
| 10 Jul 2015 07:17 PM |
I made a GUI for my game, in studio it's centered. But the button to close it gets moved upon playing. Any way to make it centered for all? Pos for the Close Button {0.3, 5},{0.5, 40} |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 10 Jul 2015 07:21 PM |
| Your new position = {0.5, -150},{0.5, -50} |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2015 07:23 PM |
UDim2.new(0.5 * (1 - Frame.Size.X.Scale), -Frame.Size.X.Offset / 2, 0.5 * (1 - Frame.Size.Y.Scale), -Frame.Size.Y.Offset/2)
So for {0, 200}, {0, 50} the center is UDim2.new(0.5, -100, 0.5, -25) |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2015 07:25 PM |
Not fixed. Could it be an issue with the Frame itself? Pos = {0.25, 0},{0.2, 0} Size = {0.4, 100},{0.3, 100} |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2015 07:25 PM |
Where does the first two lines go? Not the single numbers |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2015 07:26 PM |
| Size of the Button = {0, 200},{0, 50} |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 10 Jul 2015 07:30 PM |
| pos={scale/2 or 0.5,-offset/2,scale/2 or 05,-offset/2} |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2015 07:30 PM |
| is that for the button or frame? |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2015 07:34 PM |
| Could you reply in a simple form? Just simple pos/size for the Frame and Button? |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2015 08:47 PM |
| The first two lines are a formula for the center of any GuiObject (I tested them in studio). Below that is an example for a GuiObject with a size of UDim2.new(0, 200, 0, 50). |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2015 08:27 AM |
| so (0. -150) and (0, -25) go in pos? |
|
|
| Report Abuse |
|
|