generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Middle of the Screen for GUIs Position

Previous Thread :: Next Thread 
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Feb 2013 03:35 PM
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.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
15 Feb 2013 03:38 PM
UDim2.new(0.5, 0 , 0.5 , 0)
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Feb 2013 03:41 PM
Uh ok. It doesn't look like it's the middle in Roblox Studio but whatever.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
15 Feb 2013 03:44 PM
Where does it look like it's at?
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Feb 2013 03:49 PM
Oh nvm I had to many windows at one time. It made it look like it was to the right. Sorry, you were right.
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
15 Feb 2013 05:09 PM
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.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
15 Feb 2013 05:09 PM
@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)
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
15 Feb 2013 05:10 PM
Darn it, late post. Sorry.
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Feb 2013 05:13 PM
Now to figure out how to slap that into my Command Bar.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
15 Feb 2013 05:26 PM
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}
Report Abuse
wolverine12 is not online. wolverine12
Joined: 20 Aug 2008
Total Posts: 1100
15 Feb 2013 05:35 PM
yes
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
15 Feb 2013 05:38 PM
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}".
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Feb 2013 07:26 PM
Ok, I'll be using that. Once ROBLOX actually lets us use our custom GUIs on LoadingGUI, lol.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
15 Feb 2013 07:33 PM
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)
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Feb 2013 07:51 PM
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.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
15 Feb 2013 07:52 PM
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).
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Feb 2013 08:07 PM
*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.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
15 Feb 2013 08:09 PM
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.
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Feb 2013 08:25 PM
*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.
Report Abuse
HardMal is not online. HardMal
Joined: 29 Aug 2013
Total Posts: 3
20 Sep 2014 05:25 AM
Actually, the Middle of the Screen is {0.5,-170 , {0.5,-92}.
Your Welcome.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image