|
override void | OnCancel (BaseEventData eventData) |
|
void | SetList< TValue > (string name, IList< TValue > list, Func< TValue, int, string > getName, Action< int, TValue > onChange, bool notify=true) |
|
void | SetList< TValue > (int _index, IList< TValue > list, Func< TValue, int, string > getName, Action< int, TValue > onChange, bool notify=true) |
|
void | Next () |
|
void | Prev () |
|
Definition at line 7 of file UIDropdown.cs.
◆ CreateBlocker()
override GameObject UIDropdown.CreateBlocker |
( |
Canvas |
rootCanvas | ) |
|
|
inlineprotected |
◆ DestroyBlocker()
override void UIDropdown.DestroyBlocker |
( |
GameObject |
blocker | ) |
|
|
inlineprotected |
Definition at line 38 of file UIDropdown.cs.
39 {
42 {
43 UnityEngine.Object.Destroy(
bl.gameObject);
45 }
46 base.DestroyBlocker(blocker);
47 }
References activeInstance, and bl.
◆ Next()
Definition at line 89 of file UIDropdown.cs.
90 {
91 if (base.value < base.options.Count - 1)
92 {
93 base.value++;
94 }
95 }
Referenced by Scene.OnUpdate().
◆ OnCancel()
override void UIDropdown.OnCancel |
( |
BaseEventData |
eventData | ) |
|
|
inline |
◆ OnEnable()
override void UIDropdown.OnEnable |
( |
| ) |
|
|
inlineprotected |
◆ Prev()
◆ SetList< TValue >() [1/2]
void UIDropdown.SetList< TValue > |
( |
int |
_index, |
|
|
IList< TValue > |
list, |
|
|
Func< TValue, int, string > |
getName, |
|
|
Action< int, TValue > |
onChange, |
|
|
bool |
notify = true |
|
) |
| |
|
inline |
Definition at line 63 of file UIDropdown.cs.
64 {
65 base.options.Clear();
66 for (int i = 0; i < list.Count; i++)
67 {
68 base.options.Add(new OptionData
69 {
70 text = getName(list[i], i)
71 });
72 }
73 base.onValueChanged.RemoveAllListeners();
74 base.onValueChanged.AddListener(delegate(int a)
75 {
76 onChange(a, list[a]);
77 });
78 if (notify)
79 {
80 base.value = _index;
81 }
82 else
83 {
84 SetValueWithoutNotify(_index);
85 }
86 RefreshShownValue();
87 }
◆ SetList< TValue >() [2/2]
void UIDropdown.SetList< TValue > |
( |
string |
name, |
|
|
IList< TValue > |
list, |
|
|
Func< TValue, int, string > |
getName, |
|
|
Action< int, TValue > |
onChange, |
|
|
bool |
notify = true |
|
) |
| |
|
inline |
Definition at line 49 of file UIDropdown.cs.
50 {
51 int index = 0;
52 for (int i = 0; i < list.Count; i++)
53 {
54 if (getName(list[i], i) == name)
55 {
56 index = i;
57 break;
58 }
59 }
60 SetList(index, list, getName, onChange, notify);
61 }
◆ Update()
void UIDropdown.Update |
( |
| ) |
|
|
inlineprivate |
◆ activeInstance
◆ bl
The documentation for this class was generated from the following file: