public override void UpdateUI() { SetInputSubmitEvent((Enum)UI.IPT_POST, new EventDelegate(delegate { OnTouchPost(); })); SetActive((Enum)UI.OBJ_TARGET, true); SetActive((Enum)UI.OBJ_OWNER, false); SetInputValue((Enum)UI.IPT_POST, base.sectionData.GetText("TEXT_HELP")); SetInputLabel((Enum)UI.IPT_POST, base.sectionData.GetText("TEXT_HELP")); SetLabelText((Enum)UI.LBL_USER_NAME, MonoBehaviourSingleton <UserInfoManager> .I.userInfo.name); SetLabelText((Enum)UI.LBL_MATERIAL_NAME, data.GetName()); SetLabelText(UI.LBL_QUATITY, data.GetNum()); SetLabelText(UI.LBL_DONATE_NUM, data.GetNum()); SetLabelText(UI.LBL_DONATE_MAX, needNum); SetButtonEnabled((Enum)UI.BTN_GIFT, false); SetSliderValue((Enum)UI.SLD_PROGRESS, (float)data.GetNum() / (float)needNum); Transform ctrl = GetCtrl(UI.OBJ_MATERIAL_ICON); Item item = new Item(); item.uniqId = "0"; item.itemId = (int)data.GetTableID(); item.num = data.GetNum(); ItemInfo item2 = ItemInfo.CreateItemInfo(item); ItemSortData itemSortData = new ItemSortData(); itemSortData.SetItem(item2); SetItemIcon(ctrl, itemSortData, ctrl); }
public override void UpdateUI() { ItemInfo itemInfo = data.GetItemData() as ItemInfo; SetActive((Enum)UI.STR_SELL, data.CanSale()); SetActive((Enum)UI.BTN_DETAIL_SELL, data.CanSale() && MonoBehaviourSingleton <ItemExchangeManager> .I.IsExchangeScene()); SetLabelText((Enum)UI.LBL_NAME, data.GetName()); SetLabelText((Enum)UI.LBL_HAVE_NUM, data.GetNum().ToString()); SetLabelText((Enum)UI.LBL_DESCRIPTION, itemInfo.tableData.text); SetLabelText((Enum)UI.LBL_SELL, data.GetSalePrice().ToString()); int num = 0; int num2 = 0; num = itemInfo.tableData.enemyIconID; num2 = itemInfo.tableData.enemyIconID2; GET_TYPE getType = data.GetGetType(); ItemIcon.Create(data.GetIconType(), data.GetIconID(), data.GetRarity(), GetCtrl(UI.OBJ_ICON_ROOT), data.GetIconElement(), data.GetIconMagiEnableType(), -1, null, 0, false, -1, false, null, false, num, num2, false, getType); }
public override void UpdateUI() { SetLabelText((Enum)UI.LBL_ITEM_NAME, item.GetName()); SetLabelText((Enum)UI.LBL_TOTAL, $"{price:N0}"); int enemy_icon_id = 0; int enemy_icon_id2 = 0; if (item is ItemSortData) { ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(item.GetTableID()); if (itemData != null) { enemy_icon_id = itemData.enemyIconID; enemy_icon_id2 = itemData.enemyIconID2; } } GET_TYPE getType = item.GetGetType(); ItemIcon itemIcon = ItemIcon.Create(item.GetIconType(), item.GetIconID(), item.GetRarity(), GetCtrl(UI.OBJ_ICON_ROOT), item.GetIconElement(), item.GetIconMagiEnableType(), num, null, -1, false, -1, false, null, false, enemy_icon_id, enemy_icon_id2, false, getType); itemIcon.SetRewardBG(true); base.UpdateUI(); }
public override void UpdateUI() { base.UpdateUI(); if (iconData != null) { if (iconData is ItemSortData) { SetActive((Enum)UI.OBJ_EQUIP, false); SetActive((Enum)UI.OBJ_ITEM, true); ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(iconData.GetTableID()); SetLabelText((Enum)UI.LBL_ITEM_NAME, iconData.GetName()); SetLabelText((Enum)UI.LBL_TEXT, itemData.text); } else if (iconData is EquipItemSortData) { SetActive((Enum)UI.OBJ_EQUIP, true); SetActive((Enum)UI.OBJ_ITEM, false); EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(iconData.GetTableID()); SetLabelText((Enum)UI.LBL_ITEM_NAME, equipItemData.name); SetLabelText((Enum)UI.LBL_ATK, equipItemData.baseAtk.ToString()); SetLabelText((Enum)UI.LBL_DEF, equipItemData.baseDef.ToString()); int fixedSkillLength = equipItemData.fixedSkillLength; UI[] array = new UI[3] { UI.LBL_SKILL_A, UI.LBL_SKILL_B, UI.LBL_SKILL_C }; for (int i = 0; i < 3; i++) { if (i < fixedSkillLength) { SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(equipItemData.GetSkillSlot(0)[i].skill_id); if (skillItemData != null) { SetActive((Enum)array[i], true); SetLabelText((Enum)array[i], skillItemData.name); } else { SetActive((Enum)array[i], false); } } else { SetActive((Enum)array[i], false); } } } else { SetActive((Enum)UI.OBJ_EQUIP, true); SetActive((Enum)UI.OBJ_ITEM, false); SkillItemTable.SkillItemData skillItemData2 = Singleton <SkillItemTable> .I.GetSkillItemData(iconData.GetTableID()); SetLabelText((Enum)UI.LBL_ITEM_NAME, skillItemData2.name); SetLabelText((Enum)UI.LBL_ATK, skillItemData2.baseAtk.ToString()); SetLabelText((Enum)UI.LBL_DEF, skillItemData2.baseDef.ToString()); SetLabelText((Enum)UI.LBL_SKILL_A, string.Empty); SetLabelText((Enum)UI.LBL_SKILL_B, string.Empty); SetLabelText((Enum)UI.LBL_SKILL_C, string.Empty); } } }
protected override void OnDecision() { List <GameSectionHistory.HistoryData> historyList = MonoBehaviourSingleton <GameSceneManager> .I.GetHistoryList(); string sectionName = historyList[historyList.Count - 2].sectionName; bool flag = sectionName == "ItemDetailSkillDialog" || sectionName == "ItemDetailSkill"; if (selectIndex == -1) { if (equipSkillItem == null) { GameSection.BackSection(); } else { GameSection.ChangeEvent("DETACH", null); SendDetachEquipSkill(); } } else { SortCompareData sortCompareData = inventory.datas[selectIndex]; if (equipSkillItem != null && equipSkillItem.uniqueID == sortCompareData.GetUniqID()) { GameSection.BackSection(); } else { EquipItemInfo equipItemInfo = null; SkillItemInfo skillItemInfo = sortCompareData.GetItemData() as SkillItemInfo; if (skillItemInfo.IsCurrentEquipSetAttached) { EquipSetSkillData equipSetSkillData = skillItemInfo.equipSetSkill.Find((EquipSetSkillData x) => x.equipSetNo == MonoBehaviourSingleton <StatusManager> .I.GetCurrentEquipSetNo()); equipItemInfo = MonoBehaviourSingleton <InventoryManager> .I.equipItemInventory.Find(equipSetSkillData.equipItemUniqId); } if (equipSkillItem != null) { if (!skillItemInfo.IsCurrentEquipSetAttached) { GameSection.ChangeEvent((!flag) ? "EQUIP" : "EQUIP_DETAIL", null); CheckSendEquipSkill(); } else { GameSection.ChangeEvent((!flag) ? "STEAL" : "STEAL_DETAIL", new object[5] { equipSkillItem.tableData.name, equipSkillItem.level.ToString(), equipItemInfo.tableData.name, sortCompareData.GetName(), sortCompareData.GetLevel().ToString() }); } } else if (skillItemInfo.IsCurrentEquipSetAttached) { GameSection.ChangeEvent((!flag) ? "REPLACE" : "REPLACE_DETAIL", new object[3] { equipItemInfo.tableData.name, sortCompareData.GetName(), sortCompareData.GetLevel().ToString() }); } else { GameSection.ChangeEvent((!flag) ? "EQUIP" : "EQUIP_DETAIL", null); CheckSendEquipSkill(); } } } }
public override ItemIcon CreateIcon(object[] data) { SortCompareData sortCompareData = data[0] as SortCompareData; Transform parent = data[1] as Transform; int event_data = (int)data[2]; bool is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(ITEM_ICON_TYPE.ITEM, sortCompareData.GetUniqID()); ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(sortCompareData.GetTableID()); ItemStorageTop.SHOW_INVENTORY_MODE sHOW_INVENTORY_MODE = (ItemStorageTop.SHOW_INVENTORY_MODE)(int) data[3]; if (sHOW_INVENTORY_MODE != ItemStorageTop.SHOW_INVENTORY_MODE.SMALL) { return(ItemIconDetail.CreateMaterialIcon(sortCompareData.GetIconType(), sortCompareData.GetIconID(), sortCompareData.GetRarity(), itemData, sHOW_INVENTORY_MODE == ItemStorageTop.SHOW_INVENTORY_MODE.MAIN_STATUS, parent, sortCompareData.GetNum(), sortCompareData.GetName(), "SELECT", event_data, -1, false, is_new)); } return(ItemIconDetailSmall.CreateSmallMaterialIcon(sortCompareData.GetIconType(), sortCompareData.GetIconID(), sortCompareData.GetRarity(), parent, sortCompareData.GetNum(), sortCompareData.GetName(), "SELECT", event_data, -1, false, is_new, 0, 0, ItemIconDetail.ICON_STATUS.NONE)); }