public override void Awake() { base.Awake(); var t = mDMono.transform; _btnSave = t.GetComponent <UIButton>("Bg/Middle/BtnGroup/Btn_Save"); _btnSave.onClick.Add(new EventDelegate(OnClickSaveButton)); _btnDelete = t.GetComponent <UIButton>("Bg/Middle/BtnGroup/Btn_Delete"); _btnDelete.onClick.Add(new EventDelegate(OnClickDeleteButton)); _btnEdit = t.GetComponent <UIButton>("Bg/Middle/BtnGroup/Btn_Edit"); _btnEdit.onClick.Add(new EventDelegate(OnClickEditButton)); _btnEquip = t.GetComponent <UIButton>("Bg/Middle/BtnGroup/Btn_Equip"); _btnEquip.onClick.Add(new EventDelegate(OnClickEquipButton)); _labEquip = t.GetComponent <UILabel>("Bg/Middle/BtnGroup/Btn_Equip/Label"); _labEquip.text = EB.Localizer.GetString("ID_EQUIP_TIPS_LOAD"); _currentItemObj = t.FindEx("Bg/Middle/ScrollView/Grid/Current").gameObject; _addItemObj = t.FindEx("Bg/Middle/ScrollView/Grid/Add").gameObject; _uiGrid = t.GetComponent <UIGrid>("Bg/Middle/ScrollView/Grid"); _equipmentInfoController = t.parent.FindEx("EquipmentInfos").GetMonoILRComponent <LTPartnerEquipmentInfoController>(); _currentObjItem = _currentItemObj.GetMonoILRComponent <LTPartnerEquipmentPresetItem>(); _scrollView = t.GetComponent <UIScrollView>("Bg/Middle/ScrollView"); SetCount(PresetList.Count); }
public void SetHighlightFromItem(LTPartnerEquipmentPresetItem item) { for (var i = 0; i < _activeItems.Count; i++) { _activeItems[i].SetHighlight(_activeItems[i] == item); } _currentObjItem.SetHighlight(_currentObjItem == item); }
private void EnableCurrentItem() { EquippedPresetItem = _currentObjItem; CurrentEquipmentPresetItem = _currentObjItem; _currentItemObj.SetActive(true); _currentObjItem.SetEquipped(true); _currentObjItem.SetHighlight(true); _currentObjItem.SetCurrentItemKVP(); _currentObjItem.SetName(EB.Localizer.GetString("ID_CURRENT_EQUIPMENT")); }
public void LocateToItem(LTPartnerEquipmentPresetItem item) { LocateToItem(item.mDMono.transform); }