stroudie
|
  |
| Joined: 28 Nov 2008 |
| Total Posts: 2556 |
|
|
| 24 Jul 2013 05:59 PM |
Any way of doing so?
Currently i'm using the move event of the mouse to re-calculate positions and sizes of GUIs for each time the window re-sizes (this is so that round things can stay round and so items won't become deformed). Using the mouse gives an un-professional look as when the mouse exists the window (say to re-size the window) movement is not detected, thus leaving the GUIs in a messed up state.
Is there any event that might be of use? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 24 Jul 2013 06:00 PM |
Well, not sure if this helps but:
The scale sizing options make it "compatable" with all screen sizes. |
|
|
| Report Abuse |
|
|
stroudie
|
  |
| Joined: 28 Nov 2008 |
| Total Posts: 2556 |
|
|
| 24 Jul 2013 06:02 PM |
| But is terribad for GUIs that you don't want deformed (such as circles). |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 24 Jul 2013 06:03 PM |
True, hmm, I think one of the Roblox admins made a converter. Other than that, to get screen size, I would think there is a method using the mouse.
Matbe Mouse.ViewSizeX/Y? |
|
|
| Report Abuse |
|
|
stroudie
|
  |
| Joined: 28 Nov 2008 |
| Total Posts: 2556 |
|
|
| 24 Jul 2013 06:05 PM |
| That's not the issue. I've explained the problem in the first post. |
|
|
| Report Abuse |
|
|
stroudie
|
  |
| Joined: 28 Nov 2008 |
| Total Posts: 2556 |
|
| |
|
|
| 24 Jul 2013 06:24 PM |
| I would use the changed event of a gui that has a position of UDim2.new(1,0,1,0) and then if that changes check to see if the AbsolutePosition changed, if so the window was resized. |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 06:30 PM |
ScreenGui.Changed:connect(function() end) |
|
|
| Report Abuse |
|
|
Ludici
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 640 |
|
|
| 24 Jul 2013 06:34 PM |
Lol crazyman just comes and makes it the simplest thing that anyone could come up with.
postCount=GetService("NetworkService"):findFirstChild("postCount") postCount = postCount+1 |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 06:43 PM |
:) Any time the window is changed, the AbsoluteSize of a ScreenGui changes, therefore triggering the Changed event.
local screen = SOME_SCREENGUI
function GetAspectRatio() return (screen.AbsoluteSize.x/screen.AbsoluteSize.y) end
screen.Changed:connect(function() print("Aspect ratio: " .. GetAspectRatio()) end |
|
|
| Report Abuse |
|
|
Ludici
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 640 |
|
|
| 24 Jul 2013 06:55 PM |
Ahh there we go. That's more of an answer crazyman would give. Btw I'm making awesome edits to your plane kit. I love you for making that dude.
postCount=GetService("NetworkService"):findFirstChild("postCount") postCount = postCount+1 |
|
|
| Report Abuse |
|
|
stroudie
|
  |
| Joined: 28 Nov 2008 |
| Total Posts: 2556 |
|
| |
|
stroudie
|
  |
| Joined: 28 Nov 2008 |
| Total Posts: 2556 |
|
|
| 24 Jul 2013 07:47 PM |
Now this is strange. It seems that only resizing the window in the X-axis makes it update the GUI. I believe the precise problem is ViewSizeY not updating, rather than the event not triggering.
You can see what I mean: http://www.roblox.com/Testing-Place-place?id=51028805 |
|
|
| Report Abuse |
|
|