private void onSelect(params object[] paras) { _iconBase.setEnable(true); int materialId = Convert.ToInt32(paras[3]); _iconBase.OnUpdate(_uiType, "Image", "", IconResManager.getIconNameByMId(materialId), Convert.ToInt32(paras[3])); }
public void showIcon(int tabindex) { int itemKey = tabIndexToItemType[tabindex]; for (int j = 0; j < _iconSumPerPage; j++) { int itemId = BackpackItemManager.Instance.GetId(itemKey, j); if (itemId <= 0) { UIEventManager.SendEvent(UIEventManager.ET_UI_UPDATE, j.ToString(), _uiType, "Image", "null", "", itemId); } else { UIEventManager.SendEvent(UIEventManager.ET_UI_UPDATE, j.ToString(), _uiType, "Image", "", IconResManager.getIconNameByMId(itemId), itemId); } } // string[] sp = { "," }; // string[] ms = _materialsDic[tabindex].ToString().Split(sp, _iconSumPerPage, System.StringSplitOptions.RemoveEmptyEntries); // for (int j = 0; j < ms.Length; j++) // { // _materials[j] = Int32.Parse(ms[j]); // updateItemIcon(j, IconResManager.getIconNameByMId(Int32.Parse(ms[j]))); // } // cleanIcons(ms.Length); }
public void setIconId(int IconId) { string resName = IconResManager.getIconNameByMId(IconId); UIEventManager.SendEvent(UIEventManager.ET_UI_UPDATE, "0", _uiType, "Image", "", resName, IconId); }
public override void InitElements() { _imageTrans = mTrans.FindChild("Image"); _imageTrans.GetComponent <UGUIImage>().SetPath(_resPath); AddElement("Image", _imageTrans.GetComponent <UGUIImage>()); _button = gameObject.GetComponent <Button>(); _button.onClick.AddListener(delegate() { UIEventManager.SendEvent(UIEventManager.ET_UI_CLICK, _uiType.ToString(), "Image", "", IconResManager.getIconNameByMId(_materialId), _materialId, id); }); }