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 » Scripters
Home Search
 

Re: Math... :/

Previous Thread :: Next Thread 
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
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
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
28 Jun 2015 01:34 PM
Bump?

Anyone? Is there a way to keep the same size?
Report Abuse
booing is not online. 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
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
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 is not online. 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
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
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
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
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 is not online. 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
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
28 Jun 2015 02:01 PM
Mobile compat..
Report Abuse
sparker22 is not online. 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
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
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
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
28 Jun 2015 02:10 PM
UserInputService


You can detect if it's mobile
Report Abuse
chimmihc is not online. 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
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
28 Jun 2015 02:11 PM
@Novus: Thanks!

@chimmihc, isn't offset a lot different fit on mobile?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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