Welcome,
Guest
. Please
login
or
register
.
June 06, 2023, 05:16:55 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Getting screen rect for NGui control
« previous
next »
Print
Pages: [
1
]
Author
Topic: Getting screen rect for NGui control (Read 3361 times)
DirtyHippy
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 25
Getting screen rect for NGui control
«
on:
September 01, 2012, 09:05:50 PM »
I have been developing a pretty complex gui for a while now, and I've been using a function to get the screen rect (i.e. left, top, right, bottom) that I have written but it isn't perfect and it is driving me nuts. Is there a simple way to do this?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Getting screen rect for NGui control
«
Reply #1 on:
September 01, 2012, 10:51:20 PM »
You mean NGUIMath.Calculate series of functions? They calculate the dimensions of a group of widgets, not screen though. Screen would be just Screen.width and Screen.height.
Logged
DirtyHippy
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 25
Re: Getting screen rect for NGui control
«
Reply #2 on:
September 02, 2012, 10:25:00 AM »
No, the bounds of the control in screen space. I.e. left, top, right, bottom. The Calculate functions do not do this.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Getting screen rect for NGui control
«
Reply #3 on:
September 02, 2012, 04:05:35 PM »
The Calculate function does exactly that, actually. NGUIMath.CalculateRelativeWidgetBounds.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Getting screen rect for NGui control