Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UISlider Class Reference
Inheritance diagram for UISlider:

Public Member Functions

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 ()
 

Public Attributes

UIText textMain
 
UIText textInfo
 
UIButton buttonNext
 
UIButton buttonPrev
 

Detailed Description

Definition at line 6 of file UISlider.cs.

Member Function Documentation

◆ Next()

void UISlider.Next ( )
inline

Definition at line 48 of file UISlider.cs.

49 {
50 value++;
51 }

◆ Prev()

void UISlider.Prev ( )
inline

Definition at line 43 of file UISlider.cs.

44 {
45 value--;
46 }

◆ 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 }

Member Data Documentation

◆ buttonNext

UIButton UISlider.buttonNext

Definition at line 12 of file UISlider.cs.

◆ buttonPrev

UIButton UISlider.buttonPrev

Definition at line 14 of file UISlider.cs.

◆ textInfo

UIText UISlider.textInfo

Definition at line 10 of file UISlider.cs.

◆ textMain

UIText UISlider.textMain

Definition at line 8 of file UISlider.cs.


The documentation for this class was generated from the following file: