【ScrollCycleView】修改5

dev_chengFeng
zhangqiang 2021-02-26 14:52:59 +08:00
parent 5ea71bdeeb
commit 25f527f065
25 changed files with 96 additions and 88 deletions

View File

@ -733,7 +733,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 760.6, y: -112.2999}
m_AnchoredPosition: {x: 719.00006, y: -112.2999}
m_SizeDelta: {x: 210.65, y: 77.61}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6784752326365692122
@ -1481,7 +1481,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &9053343245304168271
RectTransform:
m_ObjectHideFlags: 0
@ -1506,7 +1506,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1.5000001, y: 345}
m_AnchoredPosition: {x: -2084, y: 345}
m_SizeDelta: {x: 900, y: 224}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &7821570915007494527
@ -1621,7 +1621,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 760.6, y: -113.1}
m_AnchoredPosition: {x: 719, y: -113.1}
m_SizeDelta: {x: 210.65, y: 77.61}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1801418174916172182

View File

@ -178,7 +178,7 @@ end
--展示活动数据
function CourtesyDressPanel:OnShowActivityData(activityData, activityType, getRewardState, isCanReward)
function CourtesyDressPanel:OnShowActivityData(activityData, activityType, getRewardState, isCanReward,isNotTop,isNotAni)
if (activityType == ActivityTypeDef.EightDayGift) then
this.titleBg.sprite = Util.LoadSprite("r_huodong_qitian")
elseif (activityType == ActivityTypeDef.OnlineGift) then
@ -226,7 +226,7 @@ function CourtesyDressPanel:OnShowActivityData(activityData, activityType, getRe
this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
end
--this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
end)
end,isNotTop,isNotAni)
if (activityType == ActivityTypeDef.OnlineGift) then--写在这的原因是先实例化完毕之后再在线奖励再计时显示
self:RemainTimeDown()
end
@ -421,7 +421,7 @@ function CourtesyDressPanel:OnRefreshPageDataShow(activityData)
elseif (selectIndex == ActivityTypeDef.ChapterAward) then
getRewardState = ActivityGiftManager.chapterGetRewardState
end
this:OnShowActivityData(activityData, selectIndex, getRewardState, canRewardIndex)
this:OnShowActivityData(activityData, selectIndex, getRewardState, canRewardIndex,true,true)
this:IsGetRewardAll(getRewardState, selectIndex, true)
end
@ -459,6 +459,7 @@ end
--刷新循环滚动数据
function this.RefreshScrollData()
this.ScrollView:SetData(activityData, function(index, item)
this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
end)

View File

@ -122,7 +122,7 @@ this.RefreshPanel = function()
this:OnClose()
UIManager.OpenPanel(UIName.XuanYuanMirrorPanel)
else
this:OnShow()
this:OnShow(true)
end
end
@ -132,7 +132,7 @@ function this:OnOpen(_type)
XuanYuanMirrorManager.curType = curType
end
function this:SwitchView()
function this:SwitchView(isNotAni)
local curObj = Util.GetGameObject(self.gameObject, "title")
curObj:GetComponent("Image").sprite = Util.LoadSprite(mirrors[curType].bg)
Util.GetGameObject(curObj, "Text"):GetComponent("Text").text = mirrors[curType].tip
@ -143,7 +143,7 @@ function this:SwitchView()
this:SetLevelData(go, dataList[index])
table.insert(list, go)
end
)
,true,isNotAni)
local t = 1
for k,v in ipairs(dataList) do
if v.state == 1 then
@ -250,7 +250,7 @@ function this:SetLevelData(go, data)
XuanYuanMirrorManager.ExecuteFightBattle(data.id,2,function()
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.freeTimeId, 1)
CheckRedPointStatus(RedPointType.People_Mirror)
this:OnShow()
this:OnShow(true)
end)
elseif data.state == 1 then
if XuanYuanMirrorManager.freeTime <= 0 then
@ -321,6 +321,7 @@ end
--界面打开时调用(用于子类重写)
function this:OnShow(...)
local args = {...}
dataList = XuanYuanMirrorManager.GetMirrorLevelData(curType)
this:RefreshTimes()
local buyTimeId = XuanYuanMirrorManager.buyTimeId
@ -329,7 +330,7 @@ function this:OnShow(...)
local buyTimes = (PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId) + 1) > PrivilegeManager.GetPrivilegeNumber(buyTimeId)
and PrivilegeManager.GetPrivilegeNumber(buyTimeId) or (PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId) + 1)
costNum = storeData.Cost[2][buyTimes]
this:SwitchView()
this:SwitchView(args[1])
end
--界面打开时调用(用于子类重写)

View File

@ -92,7 +92,7 @@ function CompoundHeroUpStarListPanel:OnOpen(heroData,HeroRankupGroupData,RankupC
end
this.ScrollView:SetData(heroDataList, function (index, go)
this.OnShowSingleCardData(go, heroDataList[index])
end)
end,false,false)
curNeedRoleNum=RankupConsumeMaterialData[4]
local str = ""
@ -256,7 +256,7 @@ function CompoundHeroUpStarListPanel:AutoSelectHero()
this.numText.text=string.format("%s/%s",LengthOfTable(curSelectHeroList),curNeedRoleNum)
this.ScrollView:SetData(heroDataList, function (index, go)
this.OnShowSingleCardData(go, heroDataList[index])
end)
end,true,true)
end
--界面关闭时调用(用于子类重写)
function CompoundHeroUpStarListPanel:OnClose()

View File

@ -94,7 +94,7 @@ function this.ShowCurrPosHeroCompound()
this.SelectHeroShow(nil)
this.ScrollView:SetData(heroDatas, function (index, go)
this.SingleHeroDataShow(go, heroDatas[index])
end)
end,false,false)
-- this.ScrollView:ForeachItemGO(function(index, go)
-- Timer.New(function()
-- go.gameObject:SetActive(true)
@ -107,7 +107,7 @@ function this.ShowCurrPosHeroCompound2()
local heroDatas = this.GetAllHeroCompoundData(curIndex)
this.ScrollView:SetData(heroDatas, function (index, go)
this.SingleHeroDataShow(go, heroDatas[index])
end)
end,true,true)
this.SelectHeroShow(curSelectHeroConfig)
end

View File

@ -93,7 +93,7 @@ function FindTreasureDispatchPanel:BindEvent()
end)
Util.AddClick(self.btnAutoSure, function()
self:AutoSelectHero()
self:OnShowPanelData(curAllHeros)
self:OnShowPanelData(curAllHeros,false,false)
end)
for i = 0, 6 do
Util.AddClick(tabs[i], function()
@ -135,7 +135,7 @@ function FindTreasureDispatchPanel:OnShow()
curSortHeroList = HeroManager.GetFingTreasureAllHeroDatas()
self:SortHeroDatas(allHeroData)
self:SortHeroDatas2(curSortHeroList)
self:OnShowPanelData(allHeroData)
self:OnShowPanelData(allHeroData,true,true)
proId = ProIdConst.All
self:SetSelectBtn()
--显示选择的英雄
@ -158,11 +158,11 @@ function FindTreasureDispatchPanel:OnShow()
if BagManager.GetItemCountById(FindTreasureManager.materialItemId) < takeItemNum then isMaterial = false end
end
function FindTreasureDispatchPanel:OnShowPanelData(_allHeroData)
function FindTreasureDispatchPanel:OnShowPanelData(_allHeroData,isTop,isAni)
curAllHeros = _allHeroData
self.ScrollView:SetData(_allHeroData, function (index, go)
self:OnShowSingleCardData(go, _allHeroData[index])
end)
end,not isTop,not isAni)
end
function FindTreasureDispatchPanel:OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
@ -255,7 +255,7 @@ function FindTreasureDispatchPanel:OnShowCardData(go,heroData,type)
curSelectHeroList[heroData.dynamicId]=nil
--监测方法
if type == 2 then
self:OnShowPanelData(curAllHeros)
self:OnShowPanelData(curAllHeros,false,false)
end
self:ShowNeedConditionData()
self:ShowSelectHeroData()
@ -286,7 +286,7 @@ function FindTreasureDispatchPanel:GetCurSortHeroListData()
heros = allHeroData
curSortHeroList = HeroManager.GetFingTreasureAllHeroDatas()
end
self:OnShowPanelData(heros)
self:OnShowPanelData(heros,false,false)
end
function FindTreasureDispatchPanel:HeroSortData(heroData)
table.sort(heroData, function(a, b)

View File

@ -112,7 +112,7 @@ function FindTreasureMainPanel:BindEvent()
PlayerManager.missingRefreshCount = PlayerManager.missingRefreshCount + 1
end
isPlayAnim = true
self:OnShowPanelData(true)
self:OnShowPanelData(true,false,false)
end)
end, nil, nil, nil)
else
@ -122,7 +122,7 @@ function FindTreasureMainPanel:BindEvent()
PlayerManager.missingRefreshCount = PlayerManager.missingRefreshCount + 1
end
isPlayAnim = true
self:OnShowPanelData(true)
self:OnShowPanelData(true,false,false)
end)
end
else
@ -145,7 +145,7 @@ function FindTreasureMainPanel:BindEvent()
--Log("missionInfo[i].missionId "..allGetMissionData[i].missionId)
TaskManager.RefreshFindTreasureStatrData(allGetMissionData[i].missionId,2)
end
self:OnShowPanelData(true)
self:OnShowPanelData(true,true,true)
end)
else
PopupTipPanel.ShowTip(Language[10662])
@ -174,7 +174,7 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function FindTreasureMainPanel:OnShow()
isPlayAnim = true
self:OnShowPanelData(true)
self:OnShowPanelData(true,true,true)
end
function FindTreasureMainPanel:OnSortingOrderChange()
--特效穿透签到
@ -193,7 +193,7 @@ function FindTreasureMainPanel:OnSortingOrderChange()
Util.AddParticleSortLayer(self.FindTreasureVipEffect, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
end
function FindTreasureMainPanel:OnShowPanelData(isSort)
function FindTreasureMainPanel:OnShowPanelData(isSort,isTop,isAni)
refreshIsMaterial = true
isRefreshAddNum = false
TaskManager.SetFindTreasureDataState()
@ -221,7 +221,7 @@ function FindTreasureMainPanel:OnShowPanelData(isSort)
-- end
self.ScrollView:SetData(missionInfo, function (index, go)
self:ActivityRewardSingleShow(go,missionInfo[index])
end)
end,not isTop,not isAni)
if isFirstOpen then
isFirstOpen = false
@ -378,7 +378,7 @@ function FindTreasureMainPanel:ActivityRewardSingleShow(_activityRewardGo,reward
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
end)
TaskManager.RefreshFindTreasureStatrData(rewardData.missionId,2)
self:OnShowPanelData(true)
self:OnShowPanelData(true,false,false)
--刷新界面
end)
end)
@ -386,7 +386,7 @@ function FindTreasureMainPanel:ActivityRewardSingleShow(_activityRewardGo,reward
NetManager.FindTreasureMissingRoomAccelerateRequest(rewardData.missionId, function()
--刷新界面
TaskManager.RefreshFindTreasureStatrData(rewardData.missionId,1)
self:OnShowPanelData(false)
self:OnShowPanelData(false,false,false)
end)
end)

View File

@ -164,7 +164,7 @@ function this:BindEvent()
else
proId=i
end
this.OnClickTabBtn(proId, true)
this.OnClickTabBtn(proId, true,true)
end)
end
--推荐阵容
@ -241,7 +241,7 @@ end
function this:OnShow()
this.ElementalResonanceView:OnOpen({sortOrder=self.sortingOrder})
this.SetDrawLevel()
this.RefreshFormation(true)
this.RefreshFormation(true,true)
end
function this:OnClose()
@ -267,7 +267,7 @@ function this:OnDestroy()
end
--刷新编队
function this.RefreshFormation(isTop)
function this.RefreshFormation(isTop,isAni)
proId=0
if this.curFormationIndex == FormationTypeDef.FORMATION_ENDLESS_MAP then
EndLessMapManager.RrefreshFormation()
@ -301,7 +301,7 @@ function this.RefreshFormation(isTop)
--设置上阵英雄信息
this.SetCardsData()
--显示英雄列表
this.OnClickTabBtn(proId, isTop)
this.OnClickTabBtn(proId, isTop,isAni)
--战力
this.RefreshPower()
@ -491,7 +491,7 @@ end
--点击筛选
function this.OnClickTabBtn(_proId, isTop)
function this.OnClickTabBtn(_proId, isTop,isAni)
local heros
this.selectBtn:SetActive(proId ==_proId)
this.selectBtn.transform:SetParent(tabs[_proId].transform)
@ -513,18 +513,18 @@ function this.OnClickTabBtn(_proId, isTop)
end
end
this.empty:SetActive(#heros<=0)
this.SetRoleList(heros, isTop)
this.SetRoleList(heros, isTop,isAni)
end
--设置英雄列表数据
function this.SetRoleList(_roleDatas, isTop)
function this.SetRoleList(_roleDatas, isTop,isAni)
this.SortHeroDatas(_roleDatas)
-- local curFormation = FormationManager.formationList[this.curFormationIndex]
this.scrollView:SetData(_roleDatas, function(index, go)
this.SingleHeroDataShow(go, _roleDatas[index])
end, not isTop)
end, not isTop,not isAni)
end
--排序英雄数据
function this.SortHeroDatas(_heroDatas)
@ -943,7 +943,7 @@ function this.SetOneKeyGo()
end
end
this.SetCardsData()
this.OnClickTabBtn(proId)
this.OnClickTabBtn(proId,false,false)
end
--设置轩辕宝镜一键上阵

View File

@ -34,9 +34,9 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function this:OnShow()
this.isClickAid = true
this.ShowPanelData()
this.ShowPanelData(true,true)
end
function this.ShowPanelData()
function this.ShowPanelData(isTop,isAni)
if MyGuildManager.MyFeteInfo.guildHelpTime < guildHelpConfig[1].HelpTime[1] then
this.titleText.text = Language[11002]..guildHelpConfig[1].HelpTime[1] - MyGuildManager.MyFeteInfo.guildHelpTime.."/"..guildHelpConfig[1].HelpTime[1]..")"
else
@ -56,7 +56,7 @@ function this.ShowPanelData()
else
this.ScrollView:SetData(allMyAidData, function (index, go)
this.SingleHelpAidDataShow(go, allMyAidData[index])
end)
end,not isTop,not isAni)
end
this.emptyObj:SetActive(#allMyAidData <= 0)
end
@ -131,6 +131,6 @@ function this.ShowRewardAndRefreshPanel(msg)
--UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function ()
MyGuildManager.SetSingleGuildHelpguildHelpTimeData()
this.isClickAid = true
this.ShowPanelData()
this.ShowPanelData(false,false)
end
return this

View File

@ -236,7 +236,7 @@ function this.ShowTitleChapterInfo()
this.SelectImage:SetActive(false)
this.titleScrollView:SetData(allConFigData, function (index, go)
this.SingleChapterDataShow(go, allConFigData[index])
end)
end,true,true)
this.titleScrollView:SetIndex(cutOpenIndex)
end
local rankingInfo,myRankingInfo
@ -251,8 +251,8 @@ function this.ShowRankingListInfo()
end
this.rankScrollView :SetData(rankingInfo, function (index, go)
this.SingleRankingInfoShow(go, rankingInfo[index])
end)
this.rankScrollView:SetIndex(1)
end,false,true)
-- this.rankScrollView:SetIndex(1)
end
function this.SingleChapterDataShow(go,data)
Util.GetGameObject(go,"title/Text"):GetComponent("Text").text = data.Remarks

View File

@ -97,7 +97,7 @@ function this.GetMailData3()
-- MailManager.UpdataMialIsReadState(allGetMail[index],3)
-- end
NetManager.GetAllMailData(function ()
this.OnShowMailListData(MailManager.mialDataList, true)
this.OnShowMailListData(MailManager.mialDataList, true,true)
end)
UIManager.OpenPanel(UIName.RewardItemPopup,_drop,1,function ()
this.UpdateMailData()
@ -127,7 +127,7 @@ function MailMainPanel:OnShow()
isPlayAnim = true
allMail={}
NetManager.GetAllMailData(function ()
this.OnShowMailListData(MailManager.mialDataList, true)
this.OnShowMailListData(MailManager.mialDataList, true,true)
end)
end
function this.CallBackOnShow()
@ -138,14 +138,15 @@ function this.CallBackOnShow()
end
local maildataCount=0--数据数量
--设置英雄列表数据
function this.OnShowMailListData(_allMail, isTop)
function this.OnShowMailListData(_allMail, isTop,isAni)
LogRed("isTop "..tostring(isTop).." isAni "..tostring(isAni))
allMail= _allMail
this:SortAllMail(allMail)
maildataCount=#allMail
this.mialNum.text=Language[11147]..maildataCount
this.ScrollView:SetData(allMail, function (index, go)
this.SingleMialDataShow(go, allMail[index])
end, not isTop)
end, not isTop,not isAni)
-- if isPlayAnim then
-- SecTorPlayAnimByScroll(this.ScrollView)
-- isPlayAnim = false

View File

@ -51,12 +51,12 @@ end
function GrowthGiftPage:OnShow()
isPlayAnim = true
self.gameObject:SetActive(true)
self:RefreshData()
self:RefreshData(true,true)
end
function GrowthGiftPage:RefreshData()
function GrowthGiftPage:RefreshData(isTop,isAni)
self:SetBtnInvestState()
self:RefreshGiftData(true,true)
self:RefreshGiftData(isTop,isAni)
end
function GrowthGiftPage:RefreshGiftData(isTop,isAni)
@ -201,7 +201,7 @@ function GrowthGiftPage:RefreshShowData(item, data)
else
MsgPanel.ShowOne(Language[11469])
end
self:RefreshData()
self:RefreshData(false,false)
end)
else
PopupTipPanel.ShowTip(Language[11470])
@ -275,7 +275,7 @@ function GrowthGiftPage:RefreshStatus()
-- 从可购买物品列表中删除
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.GrowthReward, curGiftsId)
-- 刷新当前界面显示
self:RefreshData()
self:RefreshData(false,false)
end
return GrowthGiftPage

View File

@ -51,7 +51,7 @@ function TrialRewardPopup:OnShow()
scrollView.gameObject:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
scrollView.moveTween.MomentumAmount = 1
scrollView.moveTween.Strength = 2
this.RefreshPanel()
this.RefreshPanel(true,true)
sortingOrder = self.sortingOrder
end
@ -72,7 +72,7 @@ local sortIndex = {
[2] = 1,
}
--刷新
function this.RefreshPanel()
function this.RefreshPanel(isTop,isAni)
table.sort(rewardConfig,function(a,b)
if sortIndex[a.state] == sortIndex[b.state] then
return a.Id < b.Id
@ -81,7 +81,7 @@ function this.RefreshPanel()
end)
scrollView:SetData(rewardConfig,function(index,root)
this.SetScrollPre(root,rewardConfig[index])
end)
end,not isTop,not isAni)
scrollView:SetIndex(1)
end
@ -140,7 +140,7 @@ function this.SetScrollPre(root,data)
mask:SetActive(true)
getBtn:SetActive(false)
this.ChangeState(data.Id)
this.RefreshPanel()
this.RefreshPanel(false,false)
end)
end
end)

View File

@ -40,7 +40,7 @@ function this:BindEvent()
parent:ClosePanel()
BagManager.SetDropIsSHowEquipPrint(false)
UIManager.OpenPanel(UIName.RewardItemPopup,msg,1,function ()
ResolvePanel.SwitchView(1)
ResolvePanel.SwitchView(1,true,true)
end)
end)
end)

View File

@ -56,7 +56,7 @@ function this.SendBackResolveReCallBack(drop)
for k, v in ipairs(selectEquipTreasureDataDid) do
EquipTreasureManager.RemoveTreasureByIdDyn(v)
end
ResolvePanel.SwitchView(4)
ResolvePanel.SwitchView(4,true,true)
parent:ClosePanel()
end
function this:AddListener()

View File

@ -39,7 +39,7 @@ function this:BindEvent()
PopupTipPanel.ShowTip(Language[12276])
parent:ClosePanel()
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function ()
ResolvePanel.SwitchView(2)
ResolvePanel.SwitchView(2,true,true)
end,0,nil,nil,1)
end)
end)

View File

@ -40,7 +40,7 @@ function this:BindEvent()
PopupTipPanel.ShowTip(Language[12286])
parent:ClosePanel()
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function ()
ResolvePanel.SwitchView(3)
ResolvePanel.SwitchView(3,true,true)
end,0,nil,nil,1)
end)
end)

View File

@ -77,6 +77,7 @@ end
--界面关闭时调用(用于子类重写)
function RankingSingleListPanel:OnClose()
this.scrollParentView:SetActive(false)
SoundManager.PlayOldMusic()
RankingManager.isRequest=0
this.noneImage:SetActive(false)

View File

@ -155,7 +155,7 @@ end
--切换视图
function this.SwitchView(index)
function this.SwitchView(index,isNotTop,isNotAni)
--先执行上一面板关闭逻辑
local oldSelect
@ -203,7 +203,7 @@ function this.SwitchView(index)
--执行子模块初始化
this.contents[index].view:OnShow(this.sortingOrder,this.itemListRoot)
this.contents[index].view:OnShow(this.sortingOrder,this.itemListRoot,isNotTop,isNotAni)
--刷新选择按钮
tabSortType = 0
this.EndTabBtnSelect(heroEndBtns[PlayerManager.now_index + 1])

View File

@ -69,13 +69,15 @@ function this:RemoveListener()
end
function this:OnShow(...)
local args={...}
sortingOrder = PlayerManager.now_index or 0
this.SortTypeClick(sortingOrder)
this.SortTypeClick(sortingOrder,args[3],args[4])
end
--展示数据
function this.SortTypeClick(_sortType)
function this.SortTypeClick(_sortType,isTop,isAni)
LogRed("isTop "..tostring(isTop).." isAni "..tostring(isAni))
tabSortType=_sortType
selectHeroData={}
tarHero=HeroManager.GetAllHeroDataMsinusUpWar(_sortType,2)
@ -85,7 +87,7 @@ function this.SortTypeClick(_sortType)
this.Empty:SetActive(#tarHero <= 0)
this.ScrollView:SetData(tarHero, function (index, go)
this.SingleHeroDataShow(go, tarHero[index])
end)
end,isTop,isAni)
-- this.ScrollView:ForeachItemGO(function(index, go)
-- Timer.New(function()
-- go.gameObject:SetActive(true)
@ -237,12 +239,12 @@ function this.QuickSelectListData(type)
end
this.ScrollView:SetData(tarHero, function (index, go)
this.SingleHeroDataShow(go, tarHero[index])
end)
end,true,true)
else
selectHeroData={}
this.ScrollView:SetData(tarHero, function (index, go)
this.SingleHeroDataShow(go, tarHero[index])
end)
end,true,true)
end
end
function this:OnClose()

View File

@ -62,15 +62,16 @@ function this:RemoveListener()
end
function this:OnShow(...)
local args={...}
sortingOrder =0
sortingOrder = PlayerManager.now_index or 0
LogGreen(PlayerManager.now_index)
this.SortTypeClick(sortingOrder)
this.SortTypeClick(sortingOrder,args[3],args[4])
end
--展示数据
function this.SortTypeClick(_sortType)
function this.SortTypeClick(_sortType,isTop,isAni)
tabSortType=_sortType
selectEquipTreasureData={}
if tabSortType == 0 then
@ -84,7 +85,7 @@ function this.SortTypeClick(_sortType)
this.Empty:SetActive(#tarEquipTreasure <= 0)
this.ScrollView:SetData(tarEquipTreasure, function (index, go)
this.SingleHeroDataShow(go, tarEquipTreasure[index])
end)
end,isTop,isAni)
-- this.ScrollView:ForeachItemGO(function(index, go)
-- Timer.New(function()
-- go.gameObject:SetActive(true)
@ -154,12 +155,12 @@ function this.QuickSelectListData(type)
end
this.ScrollView:SetData(tarEquipTreasure, function (index, go)
this.SingleHeroDataShow(go, tarEquipTreasure[index])
end)
end,true,true)
else
selectEquipTreasureData={}
this.ScrollView:SetData(tarEquipTreasure, function (index, go)
this.SingleHeroDataShow(go, tarEquipTreasure[index])
end)
end,true,true)
end
end
function this:OnClose()

View File

@ -189,12 +189,13 @@ function this:RemoveListener()
end
function this:OnShow(...)
local args={...}
sortingOrder =0
this.SortTypeClick(sortingOrder)
this.SortTypeClick(sortingOrder,args[3],args[4])
end
--展示数据
function this.SortTypeClick(_sortType)
function this.SortTypeClick(_sortType,isTop,isAni)
tabSortType=_sortType
selectHeroData={}
--所有灵兽数据
@ -251,7 +252,7 @@ function this.SortTypeClick(_sortType)
this.Empty:SetActive(#heroDatas <= 0)
this.ScrollView:SetData(heroDatas, function (index, go)
this.SingleHeroDataShow(go, heroDatas[index],false)
end)
end,isTop,isAni)
-- this.ScrollView:ForeachItemGO(function(index, go)
-- Timer.New(function()
-- go.gameObject:SetActive(true)
@ -346,7 +347,7 @@ function this.SingleHeroDataShow(go,_heroData,isGray)
-- --todo 取消所有碎片置灰
this.ScrollView:SetData(heroDatas, function (index, go)
this.SingleHeroDataShow(go, heroDatas[index],false)
end)
end,true,true)
isPokemon=false
end
return
@ -363,7 +364,7 @@ function this.SingleHeroDataShow(go,_heroData,isGray)
--todo 首次点击灵兽,置灰所有碎片
this.ScrollView:SetData(heroDatas, function (index, go)
this.SingleHeroDataShow(go, heroDatas[index],true)
end)
end,true,true)
this.selectText.gameObject:SetActive(true)
this.chipObj:SetActive(false)
isPokemon = true

View File

@ -58,7 +58,7 @@ function this:OnShow(...)
sortType = PlayerManager.now_index or 0
LogGreen(PlayerManager.now_index)
this.SortTypeClick(sortType)
this.SortTypeClick(sortType,args[3],args[4])
end
function this:OnClose()
@ -72,7 +72,7 @@ end
--展示数据
function this.SortTypeClick(_sortType)
function this.SortTypeClick(_sortType,isTop,isAni)
selectHeroData={}
tarHero={}
@ -91,7 +91,7 @@ function this.SortTypeClick(_sortType)
this.SortHeroDatas(tarHero)
this.ScrollView:SetData(tarHero, function (index, go)
this.SingleHeroDataShow(go, tarHero[index])
end)
end,isTop,isAni)
-- this.ScrollView:ForeachItemGO(function(index, go)
-- Timer.New(function()
-- go.gameObject:SetActive(true)

View File

@ -58,7 +58,7 @@ function this:OnShow(...)
LogGreen(PlayerManager.now_index)
this.SortTypeClick(sortType)
this.SortTypeClick(sortType,args[3],args[4])
end
function this:OnClose()
@ -72,7 +72,7 @@ end
--展示数据
function this.SortTypeClick(_sortType)
function this.SortTypeClick(_sortType,isTop,isAni)
selectHeroData={}
tarHero={}
@ -83,7 +83,7 @@ function this.SortTypeClick(_sortType)
this.SortHeroDatas(tarHero)
this.ScrollView:SetData(tarHero, function (index, go)
this.SingleHeroDataShow(go, tarHero[index])
end)
end,isTop,isAni)
-- this.ScrollView:ForeachItemGO(function(index, go)
-- Timer.New(function()
-- go.gameObject:SetActive(true)

View File

@ -99,7 +99,7 @@ function RoleUpStarListPanel:OnOpen(heroData,HeroRankupGroupData,RankupConsumeMa
end
this.ScrollView:SetData(heroDataList, function (index, go)
this.OnShowSingleCardData(go, heroDataList[index])
end)
end,false,false)
curNeedRoleNum=RankupConsumeMaterialData[4]
local str = ""
@ -246,7 +246,7 @@ function RoleUpStarListPanel:AutoSelectHero()
this.numText.text=string.format("%s/%s",LengthOfTable(curSelectHeroList),curNeedRoleNum)
this.ScrollView:SetData(heroDataList, function (index, go)
this.OnShowSingleCardData(go, heroDataList[index])
end)
end,true,true)
end
--界面关闭时调用(用于子类重写)
function RoleUpStarListPanel:OnClose()