Author Topic: Issue with OnValueChange in PopupList & Localisation Warnings  (Read 7005 times)

Shemamforash

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Issue with OnValueChange in PopupList & Localisation Warnings
« on: February 25, 2014, 09:59:19 AM »
I'm currently trying to make a simple main menu screen for my game (in a separate scene). I've created 3 PopupLists, the idea being that when you choose a value from one of the lists, you cannot choose it in the other lists.

I am having issues with the fact that my PopupLists do not use the method I have linked (my jargon is terrible) in the OnValueChange section. I have tried to debug the current PopupList from Update() but I get nothing. I am able to change the value of the PopupList but my scripts are not activated. I am also receiving some weird 'Localisation key not found' warnings because I am adding contents to the PopupLists during runtime. I've attached an annotated picture to show what my scene looks like.

While I'm here I'd also like to ask if its possible to have a PopupList that also shows sprites in the drop-down?

Shemamforash

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Issue with OnValueChange in PopupList & Localisation Warnings
« Reply #1 on: February 25, 2014, 12:14:20 PM »
I have managed to fix the issue with the OnValueChange. However I am still getting the localisation warnings, any ideas?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Issue with OnValueChange in PopupList & Localisation Warnings
« Reply #2 on: February 25, 2014, 12:38:46 PM »
Your popup list's "Localized" checkbox is checked. This means that NGUI will always try to localize that popup's values. Those warning messages tell you that the strings can't be found in your localization file.

Shemamforash

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Issue with OnValueChange in PopupList & Localisation Warnings
« Reply #3 on: February 25, 2014, 01:09:20 PM »
Yep, managed to spot that one. Didn't really know what it meant, thanks :) Any advice on getting a sprite in the drop down menu?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Issue with OnValueChange in PopupList & Localisation Warnings
« Reply #4 on: February 25, 2014, 01:36:26 PM »
If you use emoticons with a bitmap font, you can embed anything you like in there as long as it's a part of the atlas.

Shemamforash

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Issue with OnValueChange in PopupList & Localisation Warnings
« Reply #5 on: February 26, 2014, 10:39:24 AM »
Sweeet, thanks!