|
| 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
|
  |
| 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 |
|
|
|
| 21 Jun 2013 11:24 PM |
| Sorry to ask, but how exactly? I'm new to guis and stuff :3 |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|