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: To-Scale ImageButtons, TextBoxes, etc?

Previous Thread :: Next Thread 
Minecrafterguy64 is not online. Minecrafterguy64
Joined: 07 Apr 2012
Total Posts: 43
21 Jun 2013 11:13 PM
I have a button but it always goes off the gui when I resize the ROBLOX window. I want the button to stay in the same relative position (to-scale, according to the frame size) like the Help window in Acid Escape. How can I do this? (If this was Java, I'd so something like button.setSize(frame.getX()/2, frame.getY()/2), but how can I have elements' sizes be proportional, etc. to the frame size?)
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
21 Jun 2013 11:15 PM
They're 4 numbers to a UDim2 value and they go like this:

(x-scale, x-offset), (y-scale, y-offset)

By using the first two numbers on each set in your gui, they should be proportional. This goes for size and position.
Report Abuse
Minecrafterguy64 is not online. Minecrafterguy64
Joined: 07 Apr 2012
Total Posts: 43
21 Jun 2013 11:24 PM
Sorry to ask, but how exactly? I'm new to guis and stuff :3
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
21 Jun 2013 11:27 PM
If you have your Explorer and Property menus open, click on your gui (Frame, TextLabel/Button or PictureButton/image) then scroll down on properties until you find "Size" or "position"

Then change the first and third numbers on that set of numbers. Those are the "scale" controlling numbers.

C:
Report Abuse
Minecrafterguy64 is not online. Minecrafterguy64
Joined: 07 Apr 2012
Total Posts: 43
21 Jun 2013 11:46 PM
(twitter is allowed right)
I think I can show you my problem (it's the tweet at the top that says something about help for roblox) https://twitter.com/itachi0704
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
21 Jun 2013 11:59 PM
Ah. Make the that ImageButton's parent "Frame"

So your explorer should look like:

StarterGui
->ScreenGui
-->Frame
--->ImageButton
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
22 Jun 2013 12:00 AM
In addition to what I just said, that'll make it all relative to the PARENT of the object. So it'll always be relative to the relative size to "Frame" if that makes sense.
Report Abuse
Minecrafterguy64 is not online. Minecrafterguy64
Joined: 07 Apr 2012
Total Posts: 43
22 Jun 2013 12:00 AM
Thank you. Now I can scale to the frame. You've been a great help :-D

~mcguy64
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
22 Jun 2013 12:01 AM
No problem. C: Lemme know if you have any other problems.
Report Abuse
Minecrafterguy64 is not online. Minecrafterguy64
Joined: 07 Apr 2012
Total Posts: 43
22 Jun 2013 12:27 AM
Sure thing :-) I'm working on a place in which I plan to add things I may or may not know how to script :P Thanks again.

~mcguy64
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