|
| 28 Jun 2015 12:21 PM |
Hey guys, I'm trying to scale a frame within a scrolling frame, based upon 2 things..
1) The CanvasSize of the Scrolling Frame 2) The amount of items within my store.
I want to keep the item frames all the same size, no matter the size of the Canvas, but I want it to be scaled, not offset..
So I have a variable itemCount (total number of items in shop)..
I'm currently using:
frame.Size = UDim2.new(0.97,0,shopView.CanvasSize.Y.Scale*(0.2*typeCount),0)
This works, if there is only 1. Add 2 and it gets all weird. :/ Any assistance? |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2015 01:34 PM |
Bump?
Anyone? Is there a way to keep the same size? |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 28 Jun 2015 01:34 PM |
| Ask these question in script helper This is NOT the fourm |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2015 01:47 PM |
| Script helpers doesn't exist for me, so if you'd kindly post a link it, please. |
|
|
| Report Abuse |
|
|
sparker22
|
  |
| Joined: 11 Mar 2010 |
| Total Posts: 846 |
|
|
| 28 Jun 2015 01:54 PM |
booing is being a troll.
The scripting helpers subforum got merged with this scripters subforum.
So you are wanting to expand the canvas to fit all objects without extra space, correct? |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2015 01:57 PM |
No. I'm trying to make it to where no matter the size of the canvas the items inside will always be the same size..
So at CanvasSize.Y.Scale = 1, the frame.Size.Y.Scale = 0.2
I want it to be visually the same size.. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2015 01:57 PM |
booing lol
maybe you can make them a forum to get them off our once peaceful forum about the next programming language we could use or the type of hardware to run x
*sarcasm* |
|
|
| Report Abuse |
|
|
sparker22
|
  |
| Joined: 11 Mar 2010 |
| Total Posts: 846 |
|
|
| 28 Jun 2015 02:00 PM |
@ComputerChris
Is there any reason you are using scale and not offset to ensure accuracy in your scrollingframe? |
|
|
| Report Abuse |
|
|
| |
|
sparker22
|
  |
| Joined: 11 Mar 2010 |
| Total Posts: 846 |
|
|
| 28 Jun 2015 02:03 PM |
| You could use offset and use a different gui suited for mobile. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2015 02:05 PM |
| Urgh.. :/ Really wanted to avoid that if possible.. But since that seems to be the only possible way right now, there a way to 100% detect if mobile? |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2015 02:10 PM |
UserInputService
You can detect if it's mobile |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 28 Jun 2015 02:11 PM |
| Use a mixture of scale and offset for the best looking GUIs. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2015 02:11 PM |
@Novus: Thanks!
@chimmihc, isn't offset a lot different fit on mobile? |
|
|
| Report Abuse |
|
|