Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: magnatua on January 17, 2014, 06:51:03 AM

Title: Localization and UInput
Post by: magnatua on January 17, 2014, 06:51:03 AM
Hello everyone!
How can I use Localization with "default text" in UInput?


My NGUI version is 3.07
Title: Re: Localization and UInput
Post by: ArenMook on January 17, 2014, 09:30:29 PM
Put UILocalize on the UIInput. And update your NGUI. I don't know if it's possible in 3.0.7.
Title: Re: Localization and UInput
Post by: vip_prizrak_3 on January 20, 2014, 04:00:47 AM
I tried it v3.07. It does not work.
When I put UILocalize on the UIInput background picture disappeared, but localization key or srating value not translated.
Title: Re: Localization and UInput
Post by: ArenMook on January 20, 2014, 07:15:41 AM
As I said, I don't know if it's possible in 3.0.7. Please update first.
Title: Re: Localization and UInput
Post by: vip_prizrak_3 on January 20, 2014, 10:02:42 AM
I updated to version 3.0.9(f2), but it did not help.
Title: Re: Localization and UInput
Post by: ArenMook on January 21, 2014, 02:08:35 AM
Ok, I just double-checked the code. You should attach UILocalize to the UILabel of the input field, not the input field itself.

P.S. You may also need to change UIInput.defaultText to this:
  1.         public string defaultText
  2.         {
  3.                 get
  4.                 {
  5.                         return mDefaultText;
  6.                 }
  7.                 set
  8.                 {
  9.                         if (mDoInit) Init();
  10.                         mDefaultText = value;
  11.                         UpdateLabel();
  12.                 }
  13.         }
Title: Re: Localization and UInput
Post by: vip_prizrak_3 on January 21, 2014, 04:13:13 AM
Thanks!