Exemplo n.º 1
0
        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);
        }