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

Public Member Functions

void SetOptions (int _index, List< string > langs, Action< int > onSelect, bool invoke=true, string langTopic=null)
 
void SetOptions< T > (int _index, IList< T > list, Func< T, string > funcName, Action< T > onSelect, bool invoke=true, string langTopic=null)
 
void SelectOption (int _index)
 
- Public Member Functions inherited from UIButton
virtual bool CanMiddleClick ()
 
virtual void OnMiddleClick (bool forceClick)
 
void SetItem (Item i)
 
virtual void RefreshItem ()
 
virtual void OnHover ()
 
void Toggle ()
 
void ToggleCheck ()
 
void SetCheck (bool check)
 
void SetToggle (bool isOn, Action< bool > onToggle=null)
 
void SetToggleWithScore (bool isOn, Action< bool > onToggle, int? score)
 
void SetTooltip (Action< UITooltip > onShowTooltip=null, bool enable=true)
 
void SetTooltip (string id, Action< UITooltip > onShowTooltip=null, bool enable=true)
 
void SetTooltipLang (string lang=null)
 
virtual void ShowTooltip ()
 
void ShowTooltipForced (bool ignoreWhenRightClick=true)
 
override void OnPointerDown (PointerEventData eventData)
 
override void OnPointerClick (PointerEventData eventData)
 
override void OnPointerUp (PointerEventData eventData)
 
void OnPointerUpOnDrag (PointerEventData eventData)
 
void _OnPress ()
 
void OnPress ()
 
void AddHighlight (Func< bool > killCondition)
 
void DoHighlightTransition (bool instant=false)
 
void DoNormalTransition (bool instant=true)
 
override Selectable FindSelectableOnDown ()
 
override Selectable FindSelectableOnUp ()
 
override Selectable FindSelectableOnLeft ()
 
override Selectable FindSelectableOnRight ()
 
void SetNavigation (UIButton up, UIButton down=null, UIButton left=null, UIButton right=null)
 
override bool IsActive ()
 
void SetInteractableWithAlpha (bool enable)
 
virtual void ApplySkin ()
 
void ApplySkin ()
 

Public Attributes

int index
 
UIButton left
 
UIButton right
 
UIText textTitle
 
bool loopOption
 
List< string > options = new List<string>()
 
- Public Attributes inherited from UIButton
UIText mainText
 
UIText subText
 
UIText subText2
 
UIText keyText
 
Image icon
 
Image imageCheck
 
Graphic[] targetGraphics
 
float scaleIcon = 1f
 
float slideX
 
float navigationFix
 
bool isChecked
 
bool instantClick = true
 
UISelectableGroup group
 
TooltipData tooltip
 
SoundData soundClick
 
SoundData soundHighlight
 
Transform animeTarget
 
Anime animeClick
 
Anime animeHold
 
ButtonType buttonType
 
BaseSkinRoot skinRoot
 
Action onDoubleClick
 
Action onRightClick
 
Action< int > onInputWheel
 
object refObj
 
int refInt
 
string refStr
 
bool animating
 
bool selected
 
Vector3 originalIconScale = Vector3.one
 
UIButton highlightTarget
 
Item item
 

Additional Inherited Members

- Static Public Member Functions inherited from UIButton
static void UpdateButtons ()
 
static void TryHihlight ()
 
static void TryShowTip (Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
 
static void TryShowTip< T > (Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
 
- Static Public Attributes inherited from UIButton
static bool DoSlide
 
static bool locked
 
static UIButton lastButton
 
static UIButton lastHovered
 
static UIButton currentHighlight
 
static UIButton currentPressedButton
 
static float lastClicked
 
static float doubleClickTime = 0.4f
 
static Vector2 buttonPos
 
static Action onPressed
 
static List< UIButtonbuttons = new List<UIButton>()
 
static Action actionTooltip
 
- Protected Member Functions inherited from UIButton
override void Awake ()
 
override void OnEnable ()
 
override void DoStateTransition (SelectionState state, bool instant)
 
- Properties inherited from UIButton
List< Graphic > Graphics [get]
 
virtual bool CanDragLeftButton [get]
 

Detailed Description

Definition at line 4 of file UIButtonLR.cs.

Member Function Documentation

◆ SelectOption()

void UIButtonLR.SelectOption ( int  _index)
inline

Definition at line 76 of file UIButtonLR.cs.

77 {
78 if (_index < 0)
79 {
80 _index = (loopOption ? (options.Count - 1) : 0);
81 }
82 if (_index >= options.Count)
83 {
84 _index = ((!loopOption) ? (options.Count - 1) : 0);
85 }
86 index = _index;
88 }
int index
Definition: UIButtonLR.cs:7
bool loopOption
Definition: UIButtonLR.cs:15
List< string > options
Definition: UIButtonLR.cs:18
UIText mainText
Definition: UIButton.cs:102
void SetLang(string idLang)
Definition: UIText.cs:240

References index, loopOption, UIButton.mainText, options, and UIText.SetLang().

Referenced by SetOptions(), and SetOptions< T >().

◆ SetOptions()

void UIButtonLR.SetOptions ( int  _index,
List< string >  langs,
Action< int >  onSelect,
bool  invoke = true,
string  langTopic = null 
)
inline

Definition at line 20 of file UIButtonLR.cs.

21 {
22 left.onClick.RemoveAllListeners();
23 right.onClick.RemoveAllListeners();
24 options = langs;
25 left.onClick.AddListener(delegate
26 {
28 onSelect(index);
29 });
30 right.onClick.AddListener(delegate
31 {
33 onSelect(index);
34 });
35 SelectOption(_index);
36 if (invoke)
37 {
38 onSelect(index);
39 }
40 if (!langTopic.IsEmpty())
41 {
42 textTitle.SetLang(langTopic);
43 }
44 }
UIButton right
Definition: UIButtonLR.cs:11
UIText textTitle
Definition: UIButtonLR.cs:13
UIButton left
Definition: UIButtonLR.cs:9
void SelectOption(int _index)
Definition: UIButtonLR.cs:76

References index, left, options, right, SelectOption(), UIText.SetLang(), and textTitle.

Referenced by ContentConfigTest.OnInstantiate().

◆ SetOptions< T >()

void UIButtonLR.SetOptions< T > ( int  _index,
IList< T >  list,
Func< T, string >  funcName,
Action< T >  onSelect,
bool  invoke = true,
string  langTopic = null 
)
inline

Definition at line 46 of file UIButtonLR.cs.

47 {
48 options.Clear();
49 foreach (T item in list)
50 {
51 options.Add(funcName(item));
52 }
53 left.onClick.RemoveAllListeners();
54 right.onClick.RemoveAllListeners();
55 left.onClick.AddListener(delegate
56 {
58 onSelect(list[index]);
59 });
60 right.onClick.AddListener(delegate
61 {
63 onSelect(list[index]);
64 });
65 SelectOption(_index);
66 if (invoke)
67 {
68 onSelect(list[index]);
69 }
70 if (!langTopic.IsEmpty())
71 {
72 textTitle.SetLang(langTopic);
73 }
74 }
Item item
Definition: UIButton.cs:172

References index, UIButton.item, left, options, right, SelectOption(), UIText.SetLang(), and textTitle.

Member Data Documentation

◆ index

int UIButtonLR.index

Definition at line 7 of file UIButtonLR.cs.

Referenced by SelectOption(), SetOptions(), and SetOptions< T >().

◆ left

UIButton UIButtonLR.left

Definition at line 9 of file UIButtonLR.cs.

Referenced by SetOptions(), and SetOptions< T >().

◆ loopOption

bool UIButtonLR.loopOption

Definition at line 15 of file UIButtonLR.cs.

Referenced by SelectOption().

◆ options

List<string> UIButtonLR.options = new List<string>()

Definition at line 18 of file UIButtonLR.cs.

Referenced by SelectOption(), SetOptions(), and SetOptions< T >().

◆ right

UIButton UIButtonLR.right

Definition at line 11 of file UIButtonLR.cs.

Referenced by SetOptions(), and SetOptions< T >().

◆ textTitle

UIText UIButtonLR.textTitle

Definition at line 13 of file UIButtonLR.cs.

Referenced by SetOptions(), and SetOptions< T >().


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