private void ClickItemButton(IUIObject obj) { Button button = (Button)obj; int num = (this.m_CurrentPage - 1) * ItemListDlg.NUM_ITEMLIST; num += (int)button.data; if (num >= this.m_ItemList.Count) { return; } if (num >= this.m_ItemList.Count) { return; } SelectItemDlg selectItemDlg = (SelectItemDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SELECTITEM_DLG); this._dtSelectItem.SetLocation(button.GetLocation().x, button.GetLocationY()); this._dtSelectItem.Visible = true; string itemMaterialCode = NrTSingleton <ItemManager> .Instance.GetItemMaterialCode(this.m_ItemList[num].m_nItemUnique); if (!string.IsNullOrEmpty(itemMaterialCode)) { TsAudioManager.Container.RequestAudioClip("UI_ITEM", itemMaterialCode, "DROP", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } if (TsPlatform.IsMobile) { selectItemDlg.CloseNow(); } }
private void ClickItemDrawTexture(IUIObject obj) { ItemTexture itemTexture = (ItemTexture)obj; int num = (this.m_CurrentPage - 1) * ItemListDlg.NUM_ITEMLIST; num += (int)itemTexture.data; if (num >= this.m_ItemList.Count) { return; } SelectItemDlg selectItemDlg = (SelectItemDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SELECTITEM_DLG); SelectItemDlg.eType dlgType = selectItemDlg.DlgType; if (dlgType != SelectItemDlg.eType.Enhance) { } if (this._btItem[num] != null) { this._dtSelectItem.SetLocation(this._btItem[num].GetLocation().x, this._btItem[num].GetLocationY()); this._dtSelectItem.Visible = true; } string itemMaterialCode = NrTSingleton <ItemManager> .Instance.GetItemMaterialCode(this.m_ItemList[num].m_nItemUnique); if (!string.IsNullOrEmpty(itemMaterialCode)) { TsAudioManager.Container.RequestAudioClip("UI_ITEM", itemMaterialCode, "DROP", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } if (TsPlatform.IsMobile) { selectItemDlg.CloseNow(); } }