Despawned
|
  |
| Joined: 06 Apr 2013 |
| Total Posts: 12569 |
|
|
| 26 Nov 2015 07:28 PM |
Isn't is "0.5" on the first data section, then minus half of the frame's length?
Like my frame is {0, 100},{0, 50} in size, so the position would be this?
{0.5, -50},{0, 0}
Pls help |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2015 07:39 PM |
{0.5, -50},{0.5, -25} You need to get it centered on the Y axis as well. |
|
|
| Report Abuse |
|
|
Despawned
|
  |
| Joined: 06 Apr 2013 |
| Total Posts: 12569 |
|
|
| 27 Nov 2015 12:21 PM |
| @mor nah. I just wanted it on the top of the screen. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 12:23 PM |
| What is currently wrong with {0.5,-50},{0,0} |
|
|
| Report Abuse |
|
|
brados123
|
  |
| Joined: 24 Nov 2012 |
| Total Posts: 2143 |
|
|
| 27 Nov 2015 12:25 PM |
just do size:
0,500,0,55
position
0.5, -250, 0.5, -250. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 12:26 PM |
| What would this do exactly? Besides likes the GUI bigger than he wants. |
|
|
| Report Abuse |
|
|
brados123
|
  |
| Joined: 24 Nov 2012 |
| Total Posts: 2143 |
|
|
| 27 Nov 2015 05:11 PM |
| it centeres the gui, at a nice size too. |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 27 Nov 2015 05:35 PM |
#Brados
Yes it does indeed, but using that would just change the pixel size, which means no matter how big or small your screen resolution is, or your window size, the GUI will stay the same size it looks like in studio, because it is in pixels.
The other one however, would scale it down depending on the size of your resolution and window size, making it fit your screen no matter the size, which also allows it to center it at the perfect position.
This goes the same for position, if you're 400 pixels out, but your screen is only 350 pixels (example of course), then 50 pixels of that frame will be cut off.
using {0.5, -50} should work fine, if you resized your frame with the other value, then you could center it better without subtracting 50. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 05:47 PM |
This method will work for any GUI's no matter the size
1)What you need to do is find the size of you're GUI ex: {.6, 0},{.6, 0}
2) Then divide the size by 2 ex: .6/2 =.3
3) Now subtract .5 by this amount ex: .5-.3=.2
4) Use that value for you're position
NOTE: the X value and the Y must be calculated separately if they aren't different in size
For this example the final position would be {.2, 0},{.2, 0}
|
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 05:49 PM |
EDIT: NOTE: if the X and Y values a different they must be separately calculated.
|
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 27 Nov 2015 06:05 PM |
| Let me try to get you a method for this, use scale! So uh, '1' would bring the GUI element up to the top, so subtract the GUI's Y size from 1 and maybe you'll end up centered. If that's right. |
|
|
| Report Abuse |
|
|