Welcome,
Guest
. Please
login
or
register
.
June 11, 2026, 05:48:27 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Possible addition to UILocalize
« previous
next »
Print
Pages: [
1
]
Author
Topic: Possible addition to UILocalize (Read 5310 times)
ranilian
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 24
Possible addition to UILocalize
«
on:
June 17, 2012, 07:59:26 PM »
mLanguage
=
loc
.
currentLanguage
;
if
(
gameObject
.
GetComponent
<
BoxCollider
>
(
)
!=
null
)
{
// Re-adjust the collider dimensions
NGUITools
.
AddWidgetCollider
(
gameObject
)
;
}
To re-adjust the collider size of the text if it already has one on it.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Possible addition to UILocalize
«
Reply #1 on:
June 17, 2012, 08:29:28 PM »
The collider should generally be added to the parent game object, not to the localized label/sprite. For example, "button" game object instead of the background sliced sprite or the text label under it.
Logged
ranilian
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 24
Re: Possible addition to UILocalize
«
Reply #2 on:
June 17, 2012, 08:32:42 PM »
That is true only if you have a background behind your text. In our case, the text is our button.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Possible addition to UILocalize
«
Reply #3 on:
June 17, 2012, 08:40:26 PM »
You can also create your own additional script with
void
OnLocalize
(
Localization loc
)
...function inside. Inside this function you can resize the collider accordingly.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Possible addition to UILocalize