This commit is contained in:
2020-07-04 14:41:25 +08:00
parent 70c346d2c1
commit a8f02e4da5
3748 changed files with 587372 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
using UnityEngine;
using System.Collections;
using Coolape;
[RequireComponent (typeof(UIPopupList))]
public class CLUIElementPopList : UIEventListener
{
UIPopupList _poplist;
public UIPopupList poplist {
get {
if (_poplist == null) {
_poplist = GetComponent<UIPopupList> ();
_poplist.enabled = false;
}
return _poplist;
}
}
public void OnClick ()
{
ArrayList values = new ArrayList ();
values.AddRange (poplist.valueItems);
if (poplist.items.Count == 0) {
CLAlert.add (Localization.Get ("EmpyContent"), Color.white, 1, 1, false, Vector3.zero);
}
CLUIPopListPanel.show (poplist.items, values, (Callback)onSelectedValue);
}
void onSelectedValue (params object[] orgs)
{
string val = orgs [1].ToString ();
poplist.value = val;
}
}