public void RefreshHeroInfo() { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_qualifyingFormPath); if (form != null) { ListView <IHeroData> hostHeroList = CHeroDataFactory.GetHostHeroList(true); GameObject gameObject = form.gameObject.transform.Find("Panel/Panel_HeroInfo").gameObject; Text component = gameObject.transform.Find("lblProficiency").GetComponent <Text>(); CUIListScript script2 = gameObject.transform.Find("ListHeroIno").GetComponent <CUIListScript>(); script2.SetElementAmount(hostHeroList.Count); for (int i = 0; i < hostHeroList.Count; i++) { GameObject obj3 = script2.GetElemenet(i).gameObject; Image image = obj3.transform.Find("heroInfo/imgRank").GetComponent <Image>(); Text text2 = obj3.transform.Find("heroInfo/lblRank").GetComponent <Text>(); image.SetSprite(CUIUtility.s_Sprite_System_Qualifying_Dir + "ranking_icon" + hostHeroList[i].proficiencyLV, form, true, false, false); text2.text = hostHeroList[i].proficiency.ToString(); } uint num2 = 0; for (int j = 0; j < hostHeroList.Count; j++) { num2 += hostHeroList[j].proficiency; } string[] values = new string[] { num2.ToString() }; component.text = CUIUtility.StringReplace(Singleton <CTextManager> .GetInstance().GetText("Qualifying_Title0"), values); } }
public void RefreshHeroInfo() { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CQualifyingSystem.s_qualifyingFormPath); if (form == null) { return; } ListView <IHeroData> hostHeroList = CHeroDataFactory.GetHostHeroList(true, CMallSortHelper.HeroViewSortType.Name); GameObject gameObject = form.gameObject.transform.Find("Panel/Panel_HeroInfo").gameObject; Text component = gameObject.transform.Find("lblProficiency").GetComponent <Text>(); CUIListScript component2 = gameObject.transform.Find("ListHeroIno").GetComponent <CUIListScript>(); component2.SetElementAmount(hostHeroList.get_Count()); for (int i = 0; i < hostHeroList.get_Count(); i++) { GameObject gameObject2 = component2.GetElemenet(i).gameObject; Image component3 = gameObject2.transform.Find("heroInfo/imgRank").GetComponent <Image>(); Text component4 = gameObject2.transform.Find("heroInfo/lblRank").GetComponent <Text>(); component3.SetSprite(CUIUtility.s_Sprite_System_Qualifying_Dir + "ranking_icon" + hostHeroList.get_Item(i).proficiencyLV, form, true, false, false, false); component4.text = hostHeroList.get_Item(i).proficiency.ToString(); } uint num = 0u; for (int j = 0; j < hostHeroList.get_Count(); j++) { num += hostHeroList.get_Item(j).proficiency; } component.text = CUIUtility.StringReplace(Singleton <CTextManager> .GetInstance().GetText("Qualifying_Title0"), new string[] { num.ToString() }); }
private void OnTips_ItemSourceInfoOpen(CUIEvent uiEvent) { CUIFormScript formScript = Singleton <CUIManager> .GetInstance().OpenForm(s_itemGetSourceFormPath, false, true); CUseable iconUseable = uiEvent.m_eventParams.iconUseable; GameObject gameObject = formScript.gameObject.transform.Find("Panel/itemCell").gameObject; Text component = formScript.gameObject.transform.Find("Panel/lblName").GetComponent <Text>(); Text text2 = formScript.gameObject.transform.Find("Panel/lblDesc").GetComponent <Text>(); CUIListScript list = formScript.gameObject.transform.Find("Panel/List").GetComponent <CUIListScript>(); CUICommonSystem.SetItemCell(formScript, gameObject, iconUseable, false, false); component.text = iconUseable.m_name; string[] values = new string[] { iconUseable.GetSalableCount().ToString() }; text2.text = CUIUtility.StringReplace(iconUseable.m_description, values); CUICommonSystem.SetGetInfoToList(formScript, list, iconUseable); }