NGUI PopupList的使用

NGUI PopupList的使用

using UnityEngine;
using System.Collections;

public class popup : MonoBehaviour 
{
 UIPopupList popupList;
 void Start () 
 {
  popupList=GetComponent<UIPopupList>();
  EventDelegate.Add(popupList.onChange, YourFunction);
 }
 void YourFunction()
 {
  if(UIPopupList.current.value=="Third")
  {
   Debug.Log("Selection: " + UIPopupList.current.value);
  }
 }
}

猜你喜欢

转载自blog.csdn.net/highning0007/article/details/52607746