|
void | SetList< TValue > (TValue index, IList< TValue > list, Action< int, TValue > onChange, Func< TValue, string > getInfo=null) |
|
void | SetList< TValue > (int index, IList< TValue > list, Action< int, TValue > onChange, Func< TValue, string > getInfo=null) |
|
void | Prev () |
|
void | Next () |
|
Definition at line 6 of file UISlider.cs.
◆ Next()
◆ Prev()
◆ SetList< TValue >() [1/2]
void UISlider.SetList< TValue > |
( |
int |
index, |
|
|
IList< TValue > |
list, |
|
|
Action< int, TValue > |
onChange, |
|
|
Func< TValue, string > |
getInfo = null |
|
) |
| |
|
inline |
Definition at line 21 of file UISlider.cs.
22 {
23 base.minValue = 0f;
24 base.maxValue = list.Count - 1;
25 index = Mathf.Clamp(index, 0, list.Count - 1);
26 base.onValueChanged.RemoveAllListeners();
27 base.onValueChanged.AddListener(delegate(float a)
28 {
29 int num = Mathf.Clamp((int)a, 0, list.Count - 1);
30 onChange(num, list[num]);
31 if (getInfo != null)
32 {
33 textInfo.text = getInfo(list[num]);
34 }
35 });
36 if (getInfo != null)
37 {
38 textInfo.text = getInfo(list[index]);
39 }
40 value = index;
41 }
◆ SetList< TValue >() [2/2]
void UISlider.SetList< TValue > |
( |
TValue |
index, |
|
|
IList< TValue > |
list, |
|
|
Action< int, TValue > |
onChange, |
|
|
Func< TValue, string > |
getInfo = null |
|
) |
| |
|
inline |
Definition at line 16 of file UISlider.cs.
17 {
18 SetList(list.IndexOf(index), list, onChange, getInfo);
19 }
◆ buttonNext
◆ buttonPrev
◆ textInfo
◆ textMain
The documentation for this class was generated from the following file: