private void OnGridUIEventDlg(UIEventType eventType, object data, object param) { if (eventType == UIEventType.Click) { if (data is UIWardGrid) { UIWardGrid tabGrid = data as UIWardGrid; if (null != tabGrid) { uint itemID = tabGrid.ItemID; TipsManager.Instance.ShowItemTips(itemID, tabGrid.gameObject, false); } } } }
private void OnShowGridData(UIGridBase grid, int index) { if (grid == null) { return; } UIWardGrid wg = grid as UIWardGrid; if (m_idList != null) { string idStr = m_idList[index]; int itemID = 0; if (int.TryParse(idStr, out itemID)) { ItemDataBase db = GameTableManager.Instance.GetTableItem <ItemDataBase>((uint)itemID); if (db != null) { wg.ItemID = db.itemID; } } } }