public void SetModeTextComponents(ListBoxItemMode mode, Dictionary <string, string> nametexts) { foreach (var nt in nametexts) { SetModeTextComponent(mode, nt.Key, nt.Value); } }
public Transform GetModeTransform(ListBoxItemMode mode) { if (ModeTransforms.ContainsKey(mode)) { return(ModeTransforms[mode]); } return(null); }
private void AddModeTransform(ListBoxItemMode mode, string transform_name) { if (!m_modeTransforms.ContainsKey(mode)) { var t = this.gameObject.transform.Find(transform_name); if (t != null) { m_modeTransforms.Add(mode, this.gameObject.transform.Find(transform_name)); } } }
public void SetToggleOnItemClick(ListBoxItemMode mode) { var mt = GetModeTransform(mode); if (mt == null) { return; } OnItemClick.AddListener((UIEditableListBoxItem item) => { if (Mode == mode) { SetToggles(!IsToggleOn()); } }); }
public void SetMode(ListBoxItemMode mode) { if (ModeTransforms.ContainsKey(mode)) { Mode = mode; } else { Mode = ModeTransforms.First().Key; } foreach (var mt in ModeTransforms) { SetTransformActive(mt.Value, mt.Key == mode); } }
public void SetModeTextComponent(ListBoxItemMode mode, string name, string text) { SetTextComponent(ModeTransforms[mode], name, text); }