|
What would the Position be for GUIs to be in the EXACT middle? I'm going to test out the LoadingGUI feature and I would like to know this. |
|
|
UDim2.new(0.5, 0 , 0.5 , 0)
|
|
|
Uh ok. It doesn't look like it's the middle in Roblox Studio but whatever. |
|
|
Where does it look like it's at? |
|
|
Oh nvm I had to many windows at one time. It made it look like it was to the right. Sorry, you were right. |
|
|
no, it's not.
x.Position = UDim2.new(.5, x.Size.X.Offset/2, .5, x.Size.Y.Offset/2)
this is the exact center of the screen. |
|
DataStoreJoin Date: 2012-02-07 Post Count: 8540 |
@Blue, that would be the exact center for a GUI object that was 1x1. Would it not?
Position = UDim2.new(0.5, -GUI.Size.X.Offset/2, 0.5, -GUI.Size.Y.Offset/2)
|
|
DataStoreJoin Date: 2012-02-07 Post Count: 8540 |
Darn it, late post. Sorry. |
|
|
Now to figure out how to slap that into my Command Bar. |
|
DataStoreJoin Date: 2012-02-07 Post Count: 8540 |
You don't need to 'slap it' into the command bar... It's simple math.
So for example if the size of my GUI was,
{0,50}, {0,50}
And you wanted it to be centered directly in the middle, it would become
{0.5, -25}, {0.5, -25} |
|
|
DataStoreJoin Date: 2012-02-07 Post Count: 8540 |
The position that is. Sorry, I was not clear on the second half of it. The position would become "{0.5, -25}, {0.5, -25}". |
|
|
Ok, I'll be using that. Once ROBLOX actually lets us use our custom GUIs on LoadingGUI, lol. |
|
DataStoreJoin Date: 2012-02-07 Post Count: 8540 |
They do... You just make the GUI in the StarterGui, and place it in the LoadingGui after you're done. There's issues with LocalScripts not executing at the moment though... (Remember to set AutomaticallyHide off so you can hide it yourself later) |
|
|
Yes, but they put this weird Roblox Logo that pretty much takes up my whole loading time. Ima go check if they have some Method that tells when the Character completely loads so I can set AutomaticallyHide. |
|
DataStoreJoin Date: 2012-02-07 Post Count: 8540 |
No... *Head Desk*
The ROBLOX logo tweens away to show your GUI. If you toggle off "AutomaticallyHide" to begin with, your LoadingGui will be there until you call the hide method on the LoadingGui service (IN A LOCALSCRIPT). |
|
|
*Face Palm*
Oh, I was supposed to keep AutomaticallyHide on? Oops. I was also supposed to use LOCAL SCRIPTS? Durp. This is what a 12 year old gets for messing with new features. |
|
DataStoreJoin Date: 2012-02-07 Post Count: 8540 |
http://wiki.roblox.com/index.php/LoadingGui
It's under development and has some issues. It's advisable to keep AutomaticallyHide off since if it's toggled it'll automatically hide the GUI as soon as the character is loaded, regardless of if the tacky ROBLOX GUI has tweened away. Please note there's apparently some issues with LocalScripts running in LoadingGui. |
|
|
*Title Fix*
Ok, then I will call the Hide() Method at the amount of time it takes to load I guess. I will also have to find a way to make it appear when the Player starts loading, lol. I guess they will probably either have already have put that behind my back or it will be in some update. |
|
HardMalJoin Date: 2013-08-29 Post Count: 3 |
Actually, the Middle of the Screen is {0.5,-170 , {0.5,-92}.
Your Welcome. |
|