【ScrollCycleView】修改6
parent
a379a801bb
commit
152650dc3f
|
@ -306,6 +306,8 @@ function this.RefreshEnemyData()
|
||||||
table.insert(prefab,node)
|
table.insert(prefab,node)
|
||||||
local lv_name = Util.GetGameObject(node, "name")
|
local lv_name = Util.GetGameObject(node, "name")
|
||||||
local integral = Util.GetGameObject(node, "integralTip")
|
local integral = Util.GetGameObject(node, "integralTip")
|
||||||
|
Util.GetGameObject(node, "power"):SetActive(false)
|
||||||
|
Util.GetGameObject(node, "integral"):SetActive(false)
|
||||||
local power = Util.GetGameObject(node, "powerTip")
|
local power = Util.GetGameObject(node, "powerTip")
|
||||||
local headroot = Util.GetGameObject(node, "headroot")
|
local headroot = Util.GetGameObject(node, "headroot")
|
||||||
local bg = Util.GetGameObject(node, "bg")
|
local bg = Util.GetGameObject(node, "bg")
|
||||||
|
|
|
@ -135,7 +135,7 @@ function this.ShowPanelData()
|
||||||
this.aidNumText.text = Language[11010]..curAidNum.."/"..guildHelpConfig[1].RecourseTime[1]..")"
|
this.aidNumText.text = Language[11010]..curAidNum.."/"..guildHelpConfig[1].RecourseTime[1]..")"
|
||||||
this.ScrollView:SetData(allMyAidData, function (index, go)
|
this.ScrollView:SetData(allMyAidData, function (index, go)
|
||||||
this.SingleHelpDataShow(go, allMyAidData[index])
|
this.SingleHelpDataShow(go, allMyAidData[index])
|
||||||
end)
|
end,true,true)
|
||||||
end
|
end
|
||||||
function this.SingleHelpDataShow(go,data)
|
function this.SingleHelpDataShow(go,data)
|
||||||
local isHave = data.type ~= nil
|
local isHave = data.type ~= nil
|
||||||
|
|
|
@ -167,7 +167,7 @@ end
|
||||||
|
|
||||||
--消息刷新
|
--消息刷新
|
||||||
function this.RefreshTaskShow()
|
function this.RefreshTaskShow()
|
||||||
this.OnClickTabBtn(curIndex)
|
this.OnClickTabBtn(curIndex,false,false)
|
||||||
this.ShowTitleProgressRewardData()
|
this.ShowTitleProgressRewardData()
|
||||||
this.DownTabBtnRedPointShow()
|
this.DownTabBtnRedPointShow()
|
||||||
this.RefreshRedPoint()
|
this.RefreshRedPoint()
|
||||||
|
@ -256,7 +256,7 @@ function this.ShowTitleProgressRewardData()
|
||||||
end
|
end
|
||||||
NetManager.TakeMissionRewardRequest(TaskTypeDef.SevenDayCarnival, curProgressData.missionId, function(respond)
|
NetManager.TakeMissionRewardRequest(TaskTypeDef.SevenDayCarnival, curProgressData.missionId, function(respond)
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, respond.drop, 1,function ()
|
UIManager.OpenPanel(UIName.RewardItemPopup, respond.drop, 1,function ()
|
||||||
this.OnClickTabBtn(curIndex)
|
this.OnClickTabBtn(curIndex,false,false)
|
||||||
this.ShowTitleProgressRewardData()
|
this.ShowTitleProgressRewardData()
|
||||||
this.DownTabBtnRedPointShow()
|
this.DownTabBtnRedPointShow()
|
||||||
this.RefreshRedPoint()
|
this.RefreshRedPoint()
|
||||||
|
@ -291,7 +291,7 @@ function this.OnDayClickBtn(_curDayIndex)
|
||||||
end
|
end
|
||||||
this.dayBtnSelect:SetActive(curDayIndex ~= 7)
|
this.dayBtnSelect:SetActive(curDayIndex ~= 7)
|
||||||
this.dayBtnSelect2:SetActive(curDayIndex == 7)
|
this.dayBtnSelect2:SetActive(curDayIndex == 7)
|
||||||
this.OnClickTabBtn(curIndex)
|
this.OnClickTabBtn(curIndex,false,false)
|
||||||
this.CreateTabData()
|
this.CreateTabData()
|
||||||
this.DownTabBtnRedPointShow()
|
this.DownTabBtnRedPointShow()
|
||||||
end
|
end
|
||||||
|
@ -305,7 +305,7 @@ function this.TabAdapter(tab, index, status)
|
||||||
end
|
end
|
||||||
--切换视图
|
--切换视图
|
||||||
function this.SwitchView(index)
|
function this.SwitchView(index)
|
||||||
this.OnClickTabBtn(index)
|
this.OnClickTabBtn(index,true,true)
|
||||||
end
|
end
|
||||||
local sortTable = {
|
local sortTable = {
|
||||||
[0] = 2,
|
[0] = 2,
|
||||||
|
@ -333,7 +333,7 @@ function this.DownTabBtnRedPointShow()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--下方页签选择
|
--下方页签选择
|
||||||
function this.OnClickTabBtn(_curIndex)
|
function this.OnClickTabBtn(_curIndex,isTop,isAni)
|
||||||
serverTaskList = TaskManager.GetTypeTaskList(TaskTypeDef.SevenDayCarnival)
|
serverTaskList = TaskManager.GetTypeTaskList(TaskTypeDef.SevenDayCarnival)
|
||||||
curIndex = _curIndex
|
curIndex = _curIndex
|
||||||
curTaskListConfigDtata = {}
|
curTaskListConfigDtata = {}
|
||||||
|
@ -365,7 +365,7 @@ function this.OnClickTabBtn(_curIndex)
|
||||||
end)
|
end)
|
||||||
this.ScrollView:SetData(curTaskListConfigDtata, function (index, go)
|
this.ScrollView:SetData(curTaskListConfigDtata, function (index, go)
|
||||||
this.SingleItemDataShow(go, curTaskListConfigDtata[index])
|
this.SingleItemDataShow(go, curTaskListConfigDtata[index])
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
else-- 4 半价购买
|
else-- 4 半价购买
|
||||||
curShopData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.StoreTypeConfig,"StoreType",SHOP_TYPE.SEVENDAY_CARNIVAL_SHOP,"Sort",curDayIndex)
|
curShopData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.StoreTypeConfig,"StoreType",SHOP_TYPE.SEVENDAY_CARNIVAL_SHOP,"Sort",curDayIndex)
|
||||||
if curShopData then
|
if curShopData then
|
||||||
|
@ -377,7 +377,7 @@ function this.OnClickTabBtn(_curIndex)
|
||||||
|
|
||||||
this.ScrollView:SetData(shopInfoList.storeItem, function (index, go)
|
this.ScrollView:SetData(shopInfoList.storeItem, function (index, go)
|
||||||
this.SingleItemDataShow2(go, shopInfoList.storeItem[index],curShopData.Id)
|
this.SingleItemDataShow2(go, shopInfoList.storeItem[index],curShopData.Id)
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -422,7 +422,7 @@ function this.SingleItemDataShow2(go, data,curShopDataId)
|
||||||
Util.AddOnceClick(buyBtn, function()
|
Util.AddOnceClick(buyBtn, function()
|
||||||
if BagManager.GetItemCountById(item) >= num then
|
if BagManager.GetItemCountById(item) >= num then
|
||||||
ShopManager.RequestBuyItemByShopId(curShopDataId, storeConfig.Id, 1, function ()
|
ShopManager.RequestBuyItemByShopId(curShopDataId, storeConfig.Id, 1, function ()
|
||||||
this.OnClickTabBtn(curIndex)
|
this.OnClickTabBtn(curIndex,false,false)
|
||||||
this.ShowTitleProgressRewardData()
|
this.ShowTitleProgressRewardData()
|
||||||
this.DownTabBtnRedPointShow()
|
this.DownTabBtnRedPointShow()
|
||||||
this.RefreshRedPoint()
|
this.RefreshRedPoint()
|
||||||
|
|
|
@ -40,7 +40,7 @@ function TreasureStorePopup:OnOpen(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TreasureStorePopup:OnShow()
|
function TreasureStorePopup:OnShow()
|
||||||
this:RefreshPanel()
|
this:RefreshPanel(true)
|
||||||
this:TimeCountDown()
|
this:TimeCountDown()
|
||||||
isPlayAnim = true
|
isPlayAnim = true
|
||||||
end
|
end
|
||||||
|
@ -62,7 +62,7 @@ function TreasureStorePopup:OnDestroy()
|
||||||
end
|
end
|
||||||
|
|
||||||
--刷新面板
|
--刷新面板
|
||||||
function TreasureStorePopup:RefreshPanel()
|
function TreasureStorePopup:RefreshPanel(isAni)
|
||||||
local allData = {}
|
local allData = {}
|
||||||
local curActId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.TreasureStore)
|
local curActId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.TreasureStore)
|
||||||
if not curActId then
|
if not curActId then
|
||||||
|
@ -77,13 +77,13 @@ function TreasureStorePopup:RefreshPanel()
|
||||||
allData = this.SortData(allData)
|
allData = this.SortData(allData)
|
||||||
this.scrollView:SetData(allData, function (index, go)
|
this.scrollView:SetData(allData, function (index, go)
|
||||||
this:SetScrollPre(go, allData[index])
|
this:SetScrollPre(go, allData[index])
|
||||||
end)
|
end,false,not isAni)
|
||||||
end
|
end
|
||||||
-- if isPlayAnim then
|
-- if isPlayAnim then
|
||||||
-- SecTorPlayAnimByScroll(this.scrollView)
|
-- SecTorPlayAnimByScroll(this.scrollView)
|
||||||
-- isPlayAnim = false
|
-- isPlayAnim = false
|
||||||
-- end
|
-- end
|
||||||
this.scrollView:SetIndex(1)
|
-- this.scrollView:SetIndex(1)
|
||||||
|
|
||||||
end
|
end
|
||||||
function this.SortData(allData)
|
function this.SortData(allData)
|
||||||
|
@ -180,7 +180,7 @@ function this.TimeCountDown()
|
||||||
this.timer:Stop()
|
this.timer:Stop()
|
||||||
this.timer = nil
|
this.timer = nil
|
||||||
this.timer = Timer.New(function()
|
this.timer = Timer.New(function()
|
||||||
this:RefreshPanel()
|
this:RefreshPanel(false)
|
||||||
this:TimeCountDown()
|
this:TimeCountDown()
|
||||||
end,1):Start()
|
end,1):Start()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue