protected void setISOInfoBar(EquipData equipData) { // // delete by why 2014.2.10 // string numStr = ""; // if(equipData.equipDef.equipEft.isPer) // { // numStr =equipData.eftNum.ToString() + "%"; // } // else // { // numStr =equipData.eftNum.ToString(); // } // //selectISOInfo.text = equipData.equipDef.equipName + "\n" + equipData.equipDef.equipEft.eName + " : " + numStr; // selectISOInfo.text = string.Format("{0}\n{1} : {2}",Localization.instance.Get("ISO_Name_"+equipData.equipDef.id), // Localization.instance.Get("UI_Hero_"+equipData.equipDef.equipEft.eName),numStr); selectISOInfo.text = equipData.getDescString(); }
public void SetInfoBar(EquipData ed, UIAtlas atlas , string spriteName ) { if(ed == null) { TeamDlg.instance.infoPriceLabel.text = ""; TeamDlg.instance.infoDescLabel.text = ""; TeamDlg.instance.infoTitleLabel.text = ""; btnBuy.SetActive(false); btnFuse.SetActive(false); btnSell.SetActive(false); btnUpgrade.SetActive(false); TeamDlg.instance.IconGearGroup.SetActive(false); return; } TeamDlg.instance.IconGearGroup.SetActive(true); if(atlas != null) TeamDlg.instance.Icon.atlas = atlas; if(spriteName != null) TeamDlg.instance.Icon.spriteName = spriteName; TeamDlg.instance.Icon.MakePixelPerfect(); string eqname = Localization.instance.Get((ed.equipDef.type==EquipData.Type.ISO?"ISO_Name_":"Gear_Name_")+ed.equipDef.id); TeamDlg.instance.infoTitleLabel.text = eqname; TeamDlg.instance.infoDescLabel.text = ed.getDescString(); // if(ed.equipDef.equipEft != null) // { // infoLabel.text += "\n"+ed.equipDef.equipEft.eName + ": +"+ed.eftNum; // } TeamDlg.instance.infoDescLabel.text = ed.getDescString(); string price = ""; if(ed.equipDef.gold>0){ price += ((price == "")?"":"\n") + ed.equipDef.gold + " GOLD"; } if(ed.equipDef.silver>0){ price += ((price == "")?"":"\n") + ed.equipDef.silver + " SILVER"; } if(ed.equipDef.commandPoints>0){ price += ((price == "")?"":"\n") + ed.equipDef.commandPoints + " CP"; } Debug.Log("price = "+price + string.Format(" {0},{1},{2},{3}",ed.equipDef.gold,ed.equipDef.silver,ed.equipDef.commandPoints,ed.equipDef.id)); selectEquipData = ed; switch(currentFilter){ case FILTER.OWN_GEAR: btnBuy.SetActive(false); btnFuse.SetActive(false); btnSell.SetActive(true); if(ed.equipDef.type != EquipData.Type.TRINKET && ed.canUpgrade()) { upgradeFrom.text = "LV "+ed.getCurrentLv(); upgradeTo.text = "LV "+ (ed.getCurrentLv()+1); upgradeSilver.text = ed.getLvUpMoney().ToString();; btnUpgrade.SetActive(true); } else { btnUpgrade.SetActive(false); } TeamDlg.instance.infoIconBgGear.gameObject.SetActive(true); TeamDlg.instance.infoIconBgISO.gameObject.SetActive(false); TeamDlg.instance.infoPriceLabel.text = ""; break; case FILTER.OWN_ISO: btnBuy.SetActive(false); //btnFuse.SetActive(true); btnSell.SetActive(false); btnUpgrade.SetActive(false); TeamDlg.instance.infoPriceLabel.text = ""; TeamDlg.instance.infoIconBgGear.gameObject.SetActive(false); TeamDlg.instance.infoIconBgISO.gameObject.SetActive(true); break; case FILTER.STORE_HERO_APPLICABLE: case FILTER.STORE_All_NONE_HERO_SPECIFIC: case FILTER.STORE_All_HERO_SPECIFIC: case FILTER.STORE_ALL: btnBuy.SetActive(true); btnFuse.SetActive(false); btnSell.SetActive(false); btnUpgrade.SetActive(false); TeamDlg.instance.infoPriceLabel.text = price; TeamDlg.instance.infoIconBgGear.gameObject.SetActive(true); TeamDlg.instance.infoIconBgISO.gameObject.SetActive(false); break; } }