2using System.Collections.Generic;
4using UnityEngine.Events;
56 public List<UIButton>
list =
new List<UIButton>();
108 uIButton.mainText.text = text;
123 button.selected =
false;
131 uIButton.group =
this;
134 uIButton.onClick.RemoveAllListeners();
135 uIButton.onClick.AddListener(delegate
142 uIButton.onClick.RemoveListener(uIButton.
Toggle);
143 uIButton.onClick.AddListener(uIButton.
Toggle);
147 public virtual void Init(
int index = 0, UnityAction<int> action =
null,
bool directChildren =
false)
154 UIButton[] array = (directChildren ? base.transform.GetComponentsInDirectChildren<
UIButton>().ToArray() : base.transform.GetComponentsInChildren<
UIButton>(includeInactive:
true));
155 foreach (
UIButton uIButton
in array)
157 if (!uIButton.tag.Contains(
"IgnoreSelectable") && uIButton.gameObject.activeSelf)
177 for (
int i = 0; i <
list.Count; i++)
179 Navigation navigation =
list[i].navigation;
180 navigation.mode = Navigation.Mode.Explicit;
181 navigation.selectOnLeft = ((i == 0) ?
list[
list.Count - 1] :
list[i - 1]);
182 navigation.selectOnRight = ((i + 1 ==
list.Count) ?
list[0] :
list[i + 1]);
183 list[i].navigation = navigation;
218 public void Select(Func<UIButton, bool> func)
234 if (!
item ||
item.gameObject ==
null)
255 item.selected =
false;
256 item.DoNormalTransition();
262 item.SetCheck(check:
false);
274 item.SetCheck(check:
true);
285 item.selected =
true;
286 item.DoNormalTransition();
291 item.SetCheck(check:
false);
302 item.selected =
false;
303 item.DoNormalTransition();
314 item.SetCheck(check:
false);
341 item.interactable = enable;
SkinRootStatic currentSkin
static SkinManager Instance
override SkinColorProfileEx ColorsEx
void Select(UIButton button, bool check=true)
LayoutGroup layoutButtons
void RemoveButton(UIButton button)
SkinColorProfileEx.GroupColors colors
UIButton AddButton(UIButton mold, string text)
void SetButton(UIButton button)
UnityAction< int > onClick
void Select(Func< UIButton, bool > func)
virtual void Init(int index=0, UnityAction< int > action=null, bool directChildren=false)
void ToggleInteractable(bool enable)
void ForceDefaultColor(bool useNoSelection=false)