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
 

GUIs, Scale vs Offset

Previous Thread :: Next Thread 
sioux123 is not online. sioux123
Joined: 18 Nov 2011
Total Posts: 970
10 Aug 2016 02:36 PM
Say I set a GuiObject to have a size of 0, 100, 0, 100, I set that while i'm in studio on my big high resolution monitor, and it looks nice. But if someone on a small screen with a low resolution sees it, will the GuiObject appear bigger? Or does it scale?
Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
10 Aug 2016 02:38 PM
general rule of thumb:

scale for position, offset for size


Formerly xXTheRobotXx, add 13,349 posts
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
10 Aug 2016 02:39 PM
even better rule of thumb:

scale for damn near everything
Report Abuse
Patrickblox is not online. Patrickblox
Joined: 13 Jul 2009
Total Posts: 133
10 Aug 2016 02:40 PM
I'd advice using this tutorial for making GUIs:
http://devforum.roblox.com/t/keeping-the-aspect-ratio-of-your-guis/17171


Report Abuse
sioux123 is not online. sioux123
Joined: 18 Nov 2011
Total Posts: 970
10 Aug 2016 02:44 PM
I wish there was a position constraint
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
10 Aug 2016 02:47 PM
even better better advice:

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local gui = script.Parent

local ScreenSizeX = mouse.ViewSizeX
local ScreenSizeY = mouse.ViewSizeY
local ScaleX = 2
local ScaleY = 3

gui.Size = UDim2.new(0,ScreenSizeX/ScaleX,0,ScreenSizeY/ScaleY)

gui.Position = UDim2.new(0.5,-gui.AbsoluteSize.X/2,0.5,-gui.AbsoluteSize.Y/2) --centering it


Report Abuse
Aethex is not online. Aethex
Joined: 16 Oct 2011
Total Posts: 2193
10 Aug 2016 02:53 PM
To actually answer OP's question:

It will appear exactly the same size on a small screen. It won't scale to the screen size, it will stay the same. Meaning that if there's a GUI on your screen that takes up half the screen using offset, it will take up the whole screen for someone with half of your screen size.
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