// Token: 0x060003D6 RID: 982 RVA: 0x000180FA File Offset: 0x000164FA public void OpenScrollView(GameObject _callObj, ItemScrollView.Mode _setListMode, int _setId) { this.CallObj = _callObj; this.listMode = _setListMode; this.setId = _setId; this.OpenScrollView(); }
// Token: 0x060003D8 RID: 984 RVA: 0x0001813C File Offset: 0x0001653C public void OpenScrollView() { base.gameObject.SetActive(true); ItemScrollView.Mode mode = this.listMode; if (mode != ItemScrollView.Mode.View) { if (mode != ItemScrollView.Mode.Present) { if (mode == ItemScrollView.Mode.Equip) { this.CreateButton(this.setItemType); this.MaskItemType((int)this.setItemType, true); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Cursor"]); } } else { base.GetComponentInParent <UIMaster>().freezeObject(true); base.GetComponentInParent <UIMaster>().blockUI(true, new Color(0f, 0f, 0f, 0.3f)); this.setItemType = Item.Type.Specialty; this.CreateButton(this.setItemType); this.MaskItemType((int)this.setItemType, true); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Cursor"]); } } else { base.GetComponentInParent <UIMaster>().freezeObject(true); base.GetComponentInParent <UIMaster>().blockUI(true, new Color(0f, 0f, 0f, 0.3f)); this.setItemType = Item.Type.LunchBox; this.CreateButton(); this.MaskItemType((int)this.setItemType, false); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Popup"]); } this.BackFunc(); }
// Token: 0x060003D9 RID: 985 RVA: 0x0001828C File Offset: 0x0001668C public void CloseScrollView(int selectItemId) { this.DeleteButtonAll(); base.gameObject.SetActive(false); this.DeleteButtonAll(); ItemScrollView.Mode mode = this.listMode; if (mode != ItemScrollView.Mode.View) { if (mode != ItemScrollView.Mode.Present) { if (mode == ItemScrollView.Mode.Equip) { base.gameObject.SetActive(false); if (selectItemId != -1) { if (selectItemId != -2) { this.CallObj.GetComponent <BagPanel>().CloseBagScrollView1Result(this.setItemType, this.setId, selectItemId); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Enter"]); } else { this.CallObj.GetComponent <BagPanel>().CloseBagScrollView1Result(Item.Type._ElmMax, this.setId, selectItemId); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Cancel"]); } } else { this.CallObj.GetComponent <BagPanel>().CloseBagScrollView1Result(Item.Type.NONE, this.setId, selectItemId); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Cancel"]); } this.CallObj.GetComponentInParent <BagDeskPanels>().BackFunc(); } } else { base.gameObject.SetActive(false); base.GetComponentInParent <UIMaster>().freezeObject(false); base.GetComponentInParent <UIMaster>().blockUI(false, new Color(0f, 0f, 0f, 0f)); this.CallObj.GetComponent <CharaTable>().selectedItem(this.setId, selectItemId); base.gameObject.SetActive(false); this.DeleteButtonAll(); if (selectItemId == -1) { SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Cancel"]); } base.GetComponentInParent <UIMaster_MainOut>().BackFunc(); } } else { base.gameObject.SetActive(false); base.GetComponentInParent <UIMaster>().freezeObject(false); base.GetComponentInParent <UIMaster>().blockUI(false, new Color(0f, 0f, 0f, 0f)); base.gameObject.SetActive(false); this.DeleteButtonAll(); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Cancel"]); Scenes nowScenes = SuperGameMaster.GetNowScenes(); if (nowScenes != Scenes.MainOut) { if (nowScenes == Scenes.MainIn) { base.GetComponentInParent <UIMaster_MainIn>().BackFunc(); } } else { base.GetComponentInParent <UIMaster_MainOut>().BackFunc(); } } }
// Token: 0x060003DB RID: 987 RVA: 0x000184F4 File Offset: 0x000168F4 public void CreateButton(Item.Type itemType) { RectTransform component = this.contentsList.GetComponent <RectTransform>(); this.DeleteButtonAll(); List <int> list = new List <int>(); if (this.listMode == ItemScrollView.Mode.Equip) { list = this.CallObj.GetComponent <BagPanel>().Get_tmpItemListAll(); } else { list.AddRange(SuperGameMaster.GetBagList()); list.AddRange(SuperGameMaster.GetDeskList()); } using (List <ItemListFormat> .Enumerator enumerator = SuperGameMaster.saveData.ItemList.GetEnumerator()) { while (enumerator.MoveNext()) { ItemListFormat item = enumerator.Current; ItemDataFormat itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(item.id); if (itemDataFormat != null) { if (itemType == Item.Type.NONE || itemDataFormat.type == itemType) { GameObject gameObject; if (itemDataFormat.type != Item.Type.Specialty) { gameObject = UnityEngine.Object.Instantiate <GameObject>(this.btnPref); gameObject.transform.SetParent(component, false); gameObject.GetComponent <ItemButton>().CngItemName(itemDataFormat.name); gameObject.GetComponent <ItemButton>().CngItemInfo(itemDataFormat.info); } else { gameObject = UnityEngine.Object.Instantiate <GameObject>(this.spe_btnPref); gameObject.transform.SetParent(this.spe_contentsList.GetComponent <RectTransform>(), false); } gameObject.GetComponent <ItemButton>().setItemId(itemDataFormat.id, itemDataFormat.type); gameObject.GetComponent <ItemButton>().CngImage(itemDataFormat.img); gameObject.GetComponent <ItemButton>().ItemScrollView = base.gameObject; ItemScrollView.Mode mode = this.listMode; if (mode != ItemScrollView.Mode.View) { if (mode != ItemScrollView.Mode.Present) { if (mode == ItemScrollView.Mode.Equip) { if (itemDataFormat.spend) { int num = item.stock; if (list.FindIndex((int itemId) => itemId.Equals(item.id)) != -1) { foreach (int num2 in list) { if (num2 == item.id) { num--; } } } gameObject.GetComponent <ItemButton>().CngStockNum(num); if (this.CallObj.GetComponent <BagPanel>().tmpBagList[this.setId] == itemDataFormat.id) { gameObject.GetComponent <ItemButton>().Fade(new Color(0.7f, 0.7f, 0.7f)); gameObject.GetComponent <ItemButton>().SetCheckImage(true); gameObject.GetComponent <ItemButton>().setItemId(-2, Item.Type._ElmMax); } else if (num <= 0) { UnityEngine.Object.Destroy(gameObject); } } else { if (list.FindIndex((int itemId) => itemId.Equals(item.id)) != -1) { gameObject.GetComponent <Button>().interactable = false; if (this.CallObj.GetComponent <BagPanel>().tmpBagList[this.setId] == itemDataFormat.id) { gameObject.GetComponent <ItemButton>().SetCheckImage(true); gameObject.GetComponent <ItemButton>().Fade(new Color(0.7f, 0.7f, 0.7f)); gameObject.GetComponent <ItemButton>().setItemId(-2, Item.Type._ElmMax); gameObject.GetComponent <Button>().interactable = true; } else { gameObject.GetComponent <ItemButton>().Fade(new Color(0.7f, 0.7f, 0.7f)); } } gameObject.GetComponent <ItemButton>().CngStockNum(-2); } } } else if (itemDataFormat.spend) { int num3 = item.stock; if (list.FindIndex((int itemId) => itemId.Equals(item.id)) != -1) { foreach (int num4 in list) { if (num4 == item.id) { num3--; } } } if (num3 > 0) { gameObject.GetComponent <ItemButton>().CngStockNum(num3); } else { UnityEngine.Object.Destroy(gameObject); } } else { gameObject.GetComponent <ItemButton>().CngStockNum(-2); } } else { gameObject.GetComponent <Button>().enabled = false; if (itemDataFormat.spend) { int num5 = item.stock; if (list.FindIndex((int itemId) => itemId.Equals(item.id)) != -1) { foreach (int num6 in list) { if (num6 == item.id) { num5--; } } } if (num5 > 0) { gameObject.GetComponent <ItemButton>().CngStockNum(num5); } else { UnityEngine.Object.Destroy(gameObject); } } else { gameObject.GetComponent <ItemButton>().CngStockNum(-2); } } } } } } }